Hello guys,
I am taking a summer java 1 course and I have no idea how to do one of the parts of my first project for the course. The assignment is to create a program that determines if a 5 digit number is a palindrome. I am not sure how to create a code that keeps asking the user to reenter a 5 digit number if they entered the wrong number. I am assuming that somehow I have to include a while loop in the code. I was testing the loop for one of the conditions and I was unable to have the loop ask the user for a new number. I could not find any information online on this specific problem. This is what I came up with. Thank you very much for the help.
( I tried using smaller numbers to test it)
mport java.util.Scanner; public class Pelindrone { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input= new Scanner ( System.in); int num; System.out.println( "Please enter five digit number"); num = input.nextInt(); while (10 < num ) { System.out.println(" Enter new number number");} } }