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 = 100;
  15. int a = 120;
  16. int b = 80;
  17. int c = 20;
  18. if(moneyAmount >= a){
  19. System.out.println("Вы можете купить эспрессо");
  20. }
  21. if(moneyAmount >= b){
  22. System.out.println("Вы можете купить капуччино");
  23. }
  24. }if(moneyAmount >= c){
  25. System.out.println("Вы можете купить воду");
  26. }
  27. }
  28. }
Compilation error #stdin compilation error #stdout 0.06s 32656KB
stdin
Standard input is empty
compilation info
Main.java:24: error: illegal start of type
	}if(moneyAmount >= c){
	 ^
Main.java:24: error: <identifier> expected
	}if(moneyAmount >= c){
	               ^
Main.java:24: error: <identifier> expected
	}if(moneyAmount >= c){
	                    ^
Main.java:28: error: class, interface, or enum expected
}
^
4 errors
stdout
Standard output is empty