how to write an application that reads in a five digit integers and determine whether the number is as palindromes or not e.g 12321,11611.If the number is not five digit long, display an error dialog, allow the user to enter a new value.

## Ezzaral 2,714

With a text editor, of course.

Why don't you write a bit of pseudocode that outlines the general process the program must follow to complete the needed steps and post it here if you need some help with portions of it?

## @bhi -2

Try this. It can be made a lot more efficient. Next time please put at least a psuedo code.

``````import java.io.*;
class Pal
{
public static void main(String args[]) throws IOException
{
int num,rev=0,temp;
boolean flag=true;
while(flag)
{
System.out.println("Enter a number:");
//To check if it is a 5 digit number
if(num/10000>=1 && num/10000<10)
flag=false;
}
temp=num;
//Reversing the number
while(num!=0)
{
rev=rev*10+num%10;
num=num/10;
}
if(rev==temp)
System.out.println("It is a palindrome");
else
System.out.println("Not palindrome");
}
}``````
commented: Don't just hand out homework anwers. -2

## @bhi -2

Also put an error message in the if block where u check for 5 digit numbers

## Ezzaral 2,714

Try this. It can be made a lot more efficient. Next time please put at least a psuedo code.

Handing students who have shown no effort at all on their assignment the answer is against the spirit of this forum, as evidenced by this prominent post at the top of the forum: http://www.daniweb.com/forums/announcement9-2.html

You are rewarding laziness and fostering incompetence.

## ge_berjame

I have to determine whether the word enter is a palindrome or not

## Ezzaral 2,714

That's a statement, not a question. Start a new thread if you have a specific question about the code that you have written so far.

If you haven't written any code yet then you haven't really put any effort into the assignment and probably shouldn't expect anyone to else to expend any time on it either.