fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. System.out.println("Кофе-машина");
  13.  
  14. int moneyAmount = 10;
  15.  
  16. System.out.println("Вы внесли " + moneyAmount + " руб.");
  17.  
  18. int cappucinoPrice = 150;
  19. int americanoPrice = 65;
  20. int waterPrice = 20;
  21. int milkPrice= 10;
  22. boolean canBuySomething = false;
  23.  
  24. if(moneyAmount >= cappucinoPrice) {
  25. System.out.println("Вы можете купить капучино");
  26. canBuySomething = true;
  27. }
  28.  
  29. if(moneyAmount >= americanoPrice) {
  30. System.out.println("Вы можете купить американо");
  31. canBuySomething = true;
  32. }
  33.  
  34. if(moneyAmount >= waterPrice) {
  35. System.out.println("Вы можете купить воду");
  36. canBuySomething = true;
  37. }
  38. if(moneyAmount >=milkPrice) {
  39. System.out.println("Вы можете купить молоко");
  40. canBuySomething = true;
  41. }
  42. if(canBuySomething == false) {
  43. System.out.println("Недостаточно средств :( Изучайте Java и зарабатывайте много!))");
  44.  
  45.  
Compilation error #stdin compilation error #stdout 0.12s 35952KB
stdin
Standard input is empty
compilation info
Main.java:43: error: reached end of file while parsing
			System.out.println("???????????? ??????? :( ???????? Java ? ????????????? ?????!))");
			                                                                                     ^
1 error
stdout
Standard output is empty