fork(4) 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 = 12;
  15.  
  16. int cappucinoPrice = 200;
  17. int espressoPrice = 99;
  18. int waterPrice = 15;
  19. int mlecoPrice = 20;
  20.  
  21.  
  22. boolean canBuyAnything = false;
  23.  
  24. if(moneyAmount >= cappucinoPrice) {
  25. System.out.println("Вы можете купить капучино");
  26. canBuyAnything = true;
  27. }
  28.  
  29. if(moneyAmount >= espressoPrice) {
  30. System.out.println("Вы можете купить эспрессо");
  31. canBuyAnything = true;
  32. }
  33.  
  34. if(moneyAmount >= waterPrice) {
  35. System.out.println("Вы можете купить воду");
  36. canBuyAnything = true;
  37. }
  38.  
  39. if(canBuyAnything == false) {
  40. System.out.println("Недостаточно средств :( Учите джаву и идите работать!");
  41.  
  42. }
  43. if(moneyAmount >= mlecoPrice) {
  44. System.out.println("Вы можете купить молоко")
  45.  
  46.  
  47. }
  48. }
  49. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:44: error: ';' expected
			System.out.println("?? ?????? ?????? ??????")
			                                             ^
1 error
stdout
Standard output is empty