Skip to content

Commit c8c1cdb

Browse files
palindromeno
to find whether any number is palindrome or not in c
1 parent c5c05c2 commit c8c1cdb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pelindromeno

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int n,r,sum=0,temp;
5+
printf("enter the number=");
6+
scanf("%d",&n);
7+
temp=n;
8+
while(n>0)
9+
{
10+
r=n%10;
11+
sum=(sum*10)+r;
12+
n=n/10;
13+
}
14+
if(temp==sum)
15+
printf("palindrome number ");
16+
else
17+
printf("not palindrome");
18+
return 0;
19+
}

0 commit comments

Comments
 (0)