Palindrome Number

#include<stdio.h>
void main(){
	int num,temp,rev=0;
	printf("Enter any number:\n");
	scanf("%d",&num);
	for(temp=num;temp>0;temp/=10){
		rev=(rev*10)+(temp%10);
	}
	if(rev==num){
		printf("The number is Palindrome.\n");
	}else{
		printf("The number is not Palindrome.\n");
	}
}