Wisdom Materials
Home
About Us
Our Clients
Careers
Services
Education
Jobs
News
Business
Health
Astrology
Entertainment
RealEstate
Devotion
Contact Us
C Programs
/ palindrome C program
Program Name
Write a C Program for palindrome.
Theory
Given number is same as reverse of a number then it is prime.
Program Code
Copy Program Code
#include
int main() { int n,sum=0,temp; printf("Program to check Palindrome Number or not"); printf("Enter a number="); scanf("%d",&n); temp=n; while(n>0) { sum=(sum*10)+n%10; n=n/10; } if(temp==sum) printf("Given Number is Palindrome Number "); else printf("Given Number is not palindrome"); return 0; }
Input
Enter a number=151
Output
Given Number is Palindrome Number
Online C Compiler (To copy paste and Run the c program)
Home
Back