From 872d2ab690b40553bad726d2eab4e2fff10ed3c2 Mon Sep 17 00:00:00 2001 From: PawaniImalsha <43125255+PawaniImalsha@users.noreply.github.com> Date: Sun, 31 Oct 2021 19:03:40 +0530 Subject: [PATCH] Create palindrome.c --- c/palindrome.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 c/palindrome.c diff --git a/c/palindrome.c b/c/palindrome.c new file mode 100644 index 0000000..9a3edbd --- /dev/null +++ b/c/palindrome.c @@ -0,0 +1,19 @@ +#include +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; +}