C-Programming:-
In this tutorial, you will learn:-
1) Write a program to check whether a number is pallindrome or not.
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,sum=0
printf("enter any number");
scanf("%d",&n);
temp=n;
while(n>0)
{
r=n%10;
sum=sum*10+r;
n=n%10;
}
if(temp=sum)
{
printf("number is pallindrome");
}
else
{
printf("number is not pallindrome");
}
getch();
}
0 comments:
Post a Comment
If you have any doubt, please let me know