Hi, I've created a programme to figure out is any number is palindrome or not by having a value at command prompt
But when I entered the value 994009, the compiler saying it is a palindrome no. why? Although it is doing fine, when I entered any other non-palindrome no., but why it is not doing the same with the above value?
Further i am surprised to see the way you are saying yes or no. There could be other ways. Create a method.Simply check for the equality condition, return no if it is unequal , return yes after the for loop completes [ December 18, 2008: Message edited by: Sunil Kumar ]
Joined: Sep 14, 2008
Thanks, Ulf and Sunil. Could you please check, is the following is a correct way to write a palindrome code or not. Although this time it is working correct.
[ December 18, 2008: Message edited by: Pawan Arora ]
Joined: Mar 22, 2005
That looks good. Here's a version that's simplified a bit