You are viewing a single comment's thread. Return to all comments →
yo lo hice de la siguiente manera try { Scanner in = new Scanner(System.in); int n = in.nextInt(); in.close();
Integer num = n; String s = num.toString(); if (n == Integer.parseInt(s)) { System.out.println("Good job"); } else { System.out.println("Wrong answer."); } } catch (DoNotTerminate.ExitTrappedException e) {
System.out.println("Unsuccessful Termination!!"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Int to String
You are viewing a single comment's thread. Return to all comments →
yo lo hice de la siguiente manera try { Scanner in = new Scanner(System.in); int n = in.nextInt(); in.close();