Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "The number is a palindrome." If it is not then print "The number is not a palindrome"
We have to use an Array
1
Expert's answer
2012-02-21T11:20:21-0500
public class IsPalindrome {
public static void main(String [] args){
Scanner keyboard = new Scanner(System.in);
int [] array = new int [5];
while(true){
System.out.println("Input number: ");
int n = Integer.valueOf(keyboard.next()).intValue();//read n
Comments
Leave a comment