program to enter a number and check whether it is palindrome or not
Answers
Answered by
3
#include<stdio.h>
int main()
{
int num,a,sum=0,b;
printf("Enter a number: ");
scanf("%d",&num);
temp=num;
while(num)
{
a=num%10;
num=num/10;
sum=sum*10+a;
}
if(b==sum)
printf("%d is a palindrome",b);
else
printf("%d is not a palindrome",b);
return 0;
}
int main()
{
int num,a,sum=0,b;
printf("Enter a number: ");
scanf("%d",&num);
temp=num;
while(num)
{
a=num%10;
num=num/10;
sum=sum*10+a;
}
if(b==sum)
printf("%d is a palindrome",b);
else
printf("%d is not a palindrome",b);
return 0;
}
Answered by
0
Answer:
hey dear ........ .........
Similar questions