0

How write palindrom program?

5th Aug 2016, 3:22 PM
Alok Poddar
Alok Poddar - avatar
2 ответов
0
Palindrome number #include < iostream.h >; int main() { int n, reverse = 0, temp; cout<<"Enter a number to check if it is a palindrome or not\n"; cin>;>;n; temp = n; while( temp != 0 ) { reverse = reverse * 10; reverse = reverse + temp%10; temp = temp/10; } /*Taking reverse of the given no see reverse no program*/ if ( n == reverse ) /*if reverse is same as n*/ cout<<n<<"is a palindrome number.\n"; else cout<<n<<"is not a palindrome number.\n"; return 0; }
8th Aug 2016, 5:02 PM
Shyam Ravi
Shyam Ravi - avatar
0
how can you find the program ? @Shyam Ravi
17th Sep 2016, 4:04 AM
Billy Erickson
Billy Erickson - avatar