fork download
  1. print("Кофе-машина")
  2.  
  3. let moneyAmount = 120
  4.  
  5. let cappucinoPrice = 150
  6. let espressoPrice = 80
  7. let waterPrice = 40
  8. let milkPrice = 20
  9.  
  10. var canBuySomething = false
  11.  
  12. if moneyAmount >= cappucinoPrice {
  13. print("Вы можете купить капучино")
  14. canBuySomething = true
  15. }
  16. if moneyAmount >= milkoPrice {
  17. print("Вы можете купить МОлОкО")
  18. canBuySomething = true
  19. }
  20. if moneyAmount >= milkPrice {
  21. print("Вы можете купить капучино")
  22. canBuySomething = true
  23. }
  24.  
  25. if moneyAmount >= espressoPrice {
  26. print("Вы можете купить эспрессо")
  27. canBuySomething = true
  28. }
  29.  
  30. if moneyAmount >= waterPrice {
  31. print("Вы можете купить воду")
  32. canBuySomething = true
  33. }
  34.  
  35. if !canBuySomething {
  36. print("Недостаточно средств :( Изучайте iOS-разработку и зарабатывайте много!))")
  37. }
Compilation error #stdin compilation error #stdout 0s 7460KB
stdin
Standard input is empty
compilation info
prog.swift:16:19: error: use of unresolved identifier 'milkoPrice'; did you mean 'milkPrice'?
if moneyAmount >= milkoPrice {
                  ^~~~~~~~~~
                  milkPrice
prog.swift:8:5: note: 'milkPrice' declared here
let milkPrice = 20
    ^
<unknown>:0: error: error opening input file 'prog.o' (No such file or directory
)
clang: error: no such file or directory: 'prog.o'
clang: error: no such file or directory: '@prog.autolink'
stdout
Standard output is empty