Skip to content

Commit

Permalink
Create palindrome.c
Browse files Browse the repository at this point in the history
  • Loading branch information
rajpootrahul6113 authored Oct 5, 2019
1 parent d365702 commit 5627987
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions palindrome.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include<stdio.h>
int main()
{
int n,r,sum=0,temp;
printf("enter the number=");
scanf("%d",&n);
temp=n;
while(n>0)
{
r=n%10;
sum=(sum*10)+r;
n=n/10;
}
if(temp==sum)
printf("palindrome number ");
else
printf("not palindrome");
return 0;
}

0 comments on commit 5627987

Please sign in to comment.