Other sites:

Thursday, November 11, 2010

C Program Code

//Check number is palindrome of not#include "stdio.h"#include "conio.h"void main(){int num,rev=0,m,r;clrscr();printf("enter any number");scanf("%d",&num);m=num;while(num>0){r=num%10;rev=rev*10+r;num=num/10;}if(rev==m)printf("given number is palindrome");elseprintf("given number is not palindrome");getch();}

Input/Output

enter any number 121given number is palindrome

enter any number 423given number is not palindrome

What is Palindrome No?

when we read a number. If backward read is as same as forward read then number is palindrome.

Follow by Email

Facebook Page

Hey, If you have other program's and you want to publish here. Please write me at support @100india.com
We will publish your shared example with your name as
'This example is Contribute by: Deepak Kumar'.
Java Sample Examples