Thursday, June 4, 2009
C Programming :- Pallendrums
How to check whether a number is a pallendrum like 121, 414, 525 etc?
Here is the C program code. Enter this code in the C compiler & press alt+f9.
Enjoy............
#include
#include
main()
{ int a,b,c,s;
clrscr();
printf("Enter The First Number:-\n");
scanf("%d",&a);
a=s; while(a>0){
b=a%10;c=a*10+b;
a=a/10;} printf("The Changed Number Is: %d\n",c);
if(s==c){
printf("The Number Is a Pallendrum");}
else{printf("The Number is not a pallendrum");}
getch();}
By Unnikrishnan
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Enter a comment. Help us to help you.