fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.Scanner;
  4. import java.util.Random;
  5.  
  6. /* Name of the class has to be "Main" only if the class is public. */
  7. class Ideone
  8. {
  9. public static void main (String[] args) throws java.lang.Exception
  10. {
  11. Scanner sc = new Scanner(System.in);
  12. Random rnd = new Random();
  13. Int sc = sc.nextInt();
  14. Int a = rnd.nextInt(100)+1;
  15. System.out.println(a)
  16. While(true) {
  17. if(a>sc){
  18. System.out.println("업");
  19. }
  20. if(a<sc){
  21. System.out.println("다운");
  22. }
  23. if(a==sc){
  24. System.out.println("정답");
  25. break;
  26. }
  27.  
  28. }
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
compilation info
Main.java:15: error: ';' expected
System.out.println(a)
                     ^
Main.java:16: error: ';' expected
While(true) {
           ^
Main.java:29: error: reached end of file while parsing
}
 ^
3 errors
stdout
Standard output is empty