Viktor_Profa

Viktor Viktorovich - 07.06.2022- Ліфт Empire State

Jun 7th, 2022 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // https://shpp.gitbook.io/zero/tutorials/if-else/empire-state-building-lift
  2.  
  3.  
  4.  
  5. let number = prompt ("Вкажіть номер поверху")
  6.  
  7.    
  8. if(number >= 40){
  9.     if (number > 102){
  10.            console.log("Невірний поверх")
  11.         }
  12.     if (number <= 102 ){
  13.             console.log("Ok")
  14.             }
  15.         }
  16.  
  17.        
  18.    
  19. else if(number <= 23){
  20.     if(number < 1){
  21.             console.log("Невірний поверх")
  22.         }
  23.     if (number >= 1){
  24.             console.log("Ок")
  25.         }
  26. }
  27.  
  28. else{
  29.     let password = prompt ("Введіть пароль!")
  30.        if (password == 1337){
  31.             console.log("ОК")
  32.         }
  33.         if (password != 1337){
  34.             console.log("Невірний пароль")
  35.         }
  36. }
  37.  
Add Comment
Please, Sign In to add comment