0
How write palindrom program?
2 Réponses
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;
}
0
how can you find the program ? @Shyam Ravi