Program to check a number is palindrome or not – Coding Question 10
Write a program to check a number is palindrome or not. #include<stdio.h> int main() { int num,temp,sum=0,r; printf("n Enter a number: "); scanf("%d",&num); temp=num; while(num!=0) { r=num%10; sum=sum*10+r; num=num/10; } printf("n Reverse No. of %d= %d",temp,sum); if(sum==temp) printf("n %d is a pallindrome no.",temp); else printf("n %d is not a pallindrome no.",temp); return 0; } Join […]
Program to check a number is palindrome or not – Coding Question 10 Read More »