Write A Program to Check the given number is Palindrome or not

#include<stdio.h> #include<conio.h> main ( ) { int x, y, n , pal=0; printf (“enter x value “); scanf (“% d”, &...

#include<stdio.h>
#include<conio.h>
main ( )
{
int x, y, n , pal=0;
printf (“enter x value “);
scanf (“% d”, & x) ;
n=x;
while ( x > 0)
{
 y = x%10;
pal = pal * 10 + y;
 x = x/10;
}
if (pal = = n)
printf (“% d is palindrome”, n);
else
printf (“% d is not palindrome” n);
getch ( );
}
Out Put:
Enter x value 121

121 is palindrome

Related

C Programs 8423755181379376094

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item