Número de palíndromo en el programa C
#include<stdio.h>
void main(){
int num, cNum, rev, rem;
printf("Enter a number = ");
scanf("%d",&num); //0
cNum = num; //123
rev = 0;
while(cNum != 0){
rem = cNum % 10;
rev = rev * 10 + rem;
cNum /= 10;
}
if(num == rev){
printf("Palindrome");
}
else{
printf("Not Palindrome");
}
}
Excited Earthworm