fork(1) download
  1. print("Кофе-машина — Артем Егоров")
  2.  
  3. var moneyAmount = 120
  4.  
  5. var cappucinoPrice = 150
  6. var espressoPrice = 80
  7. var waterPrice = 20
  8. var kvasPrice = 75
  9. var juicePrice = 65
  10.  
  11. if moneyAmount >= cappucinoPrice {
  12. print("Вы можете купить капучино")
  13. }
  14.  
  15. if moneyAmount >= espressoPrice {
  16. print("Вы можете купить эспрессо")
  17. }
  18.  
  19. if moneyAmount >= waterPrice {
  20. print("Вы можете купить воду")
  21. }
  22.  
  23. if moneyAmount >= kvasPrice {
  24. print("Вы можете купить квас")
  25. }
  26.  
  27. if moneyAmount >= juicePrice {
  28. print("Вы можете купить сок")
  29. }
Success #stdin #stdout 0.01s 7380KB
stdin
Standard input is empty
stdout
Кофе-машина — Артем Егоров
Вы можете купить эспрессо
Вы можете купить воду
Вы можете купить квас
Вы можете купить сок