Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

C Program to check whether given Integer is Palindrome or Not

Sample Input 1 :

656

Sample Output 1 :

Palindronme (Reverse of 656 is 656)

Program or Solution

					    
							
#include<stdio.h>
int main()
{
	int num,rev,rem;
	scanf("%d",&num);
	while(num!=0)
	{
		rem=num%10;
		rev=rev*10+rem;
		num/=10;
	}
	printf("Reverse is %d",rev);
	return 0;
}
		
					    
					

Program Explanation

refer video tutorial