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. Scanner a = new Scanner("Веведите сумму");
  11. int moneyAmount = a.nextInt();
  12. Systen.out.println(moneyAmount);
  13.  
  14. public static void main (String[] args) throws java.lang.Exception
  15. {
  16. System.out.println("Кофе-машина");
  17.  
  18. int moneyAmount = 12;
  19.  
  20. int cappucinoPrice = 150;
  21. int espressoPrice = 80;
  22. int waterPrice = 20;
  23. int milkPrice = 40;
  24.  
  25. boolean canBuyAnything = false;
  26.  
  27. if(moneyAmount >= cappucinoPrice) {
  28. System.out.println("Вы можете купить капучино");
  29. canBuyAnything = true;
  30. }
  31.  
  32. if(moneyAmount >= espressoPrice) {
  33. System.out.println("Вы можете купить эспрессо");
  34. canBuyAnything = true;
  35. }
  36.  
  37. if(moneyAmount >= waterPrice) {
  38. System.out.println("Вы можете купить воду");
  39. canBuyAnything = true;
  40. }
  41.  
  42. if(moneyAmount >= milkPrice) {
  43. System.out.println("Вы можете купить молоко");
  44. canBuyAnything = true;
  45. }
  46.  
  47. if(canBuyAnything == false) {
  48. System.out.println("Недостаточно средств :( Изучайте Java и зарабатывайте много!))");
  49. }
  50. }
  51. }
Compilation error #stdin compilation error #stdout 0.06s 32552KB
stdin
Standard input is empty
compilation info
Main.java:12: error: <identifier> expected
	Systen.out.println(moneyAmount);
	                  ^
Main.java:12: error: <identifier> expected
	Systen.out.println(moneyAmount);
	                              ^
2 errors
stdout
Standard output is empty