Palindrome or non Palindrome

#include <stdio.h>
#include <stdlib.h>
int main(){
 
    int num, num2, sum=0;
 
    printf("Please enter a integer.");
    scanf("%d", &num);
    num2=num;
 
    while(num){
        sum = sum*10+num%10;
        num = num/10;
    }
 
    if(sum==num2){
        printf("This number is Palindrome.");
    }else{
         printf("This number is not Palindrome.");
    }
 
    return 0;
}