+ 2

Check whether a number is Palindrome or not using for loop

Write a program to check whether the given is Palindrome or not. Do it using for Loop.

2nd Feb 2018, 11:43 AM
Nitish
Nitish - avatar
3 Answers
+ 1
int rev =0, d; for(I=n;I>0;I=I/10){ d=I/10; rev = rev*10+d; } if(rev = n) System.out.print("palindrome ");
3rd Feb 2018, 9:07 AM
Rachit Agarwal
2nd Feb 2018, 1:49 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
https://code.sololearn.com/c8nEpu62W3Kd/?ref=app
2nd Feb 2018, 12:41 PM
Andreas K
Andreas K - avatar