Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  pal.c
Language: C/C++
Code:
#include <stdio.h>
main()
{
int n,rev=0,r,temp;
printf("n enter the no");
scanf("%d",&n);
temp=n;
do
{
r=n%10;
rev=(rev*10)+r;
n=n/10;
}while(n!=0);
if (temp==rev)
{
printf("given is palindrome");
}
else
{
printf("given is not a palindrome");
}
getch();
}
          
          
          
          
          
Comments: