fork(6) download
  1. <?php
  2.  
  3. print("Кофе-машина\n");
  4.  
  5. $moneyAmount = 120;
  6.  
  7. $cappucinoPrice = 200;
  8. $espressoPrice = 100;
  9. $waterPrice = 50;
  10.  
  11. if ($moneyAmount >= $cappucinoPrice) {
  12. print("Вы можете купить капучино\n");
  13. }
  14.  
  15. if ($moneyAmount >= $espressoPrice) {
  16. print("Вы можете купить эспрессо\n");
  17. }
  18.  
  19. if ($moneyAmount >= $waterPrice) {
  20. print("Вы можете купить воду\n");
  21. }
Success #stdin #stdout 0.02s 25992KB
stdin
Standard input is empty
stdout
Кофе-машина
Вы можете купить эспрессо
Вы можете купить воду