From dbc71a59cb3c491938814c8cd4f4680d786fc747 Mon Sep 17 00:00:00 2001 From: shalu1207 <115417063+shalu1207@users.noreply.github.com> Date: Sun, 9 Oct 2022 21:42:46 +0530 Subject: [PATCH] Create palindrome.c --- palindrome.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 palindrome.c diff --git a/palindrome.c b/palindrome.c new file mode 100644 index 0000000..ad701fa --- /dev/null +++ b/palindrome.c @@ -0,0 +1,19 @@ +#include +int main() +{ + int temp,n,r,sum=0; + + printf("enter the numbers"); + scanf("%d",&n); + temp=n; + while(n>0){ + r=n%10; + sum=(sum*10)+r; + n=n/10; + } + if(temp==sum) + printf("it is palindrome number"); + else + printf("not a palindrome number"); + +}