#include <stdio.h>

int main(){
    int a,temp,rem,rev=0;
    
    scanf("%d",&a);
    
    for(temp=a;temp>0;temp=temp/10){  //1331  //1331 /10 = 133 //exit when loop==0
        rem=temp%10; //1331%10 = 1 //133 % 10 = 3
        rev=rev*10+rem; //0 * 10 + 1 = 0 + 1 => 1 // 1 * 10 + 3 = 10 + 3 => 13
    }
    
    printf("%d\n",rev);
    if (a==rev)
     printf("\n%d is Palindrome.\n", a);

    else
     printf("%d is not.\n", a);
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: