#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<string.h>
int main ()
{char str1[100];
char str2[100];
printf("entr a srting \n");
gets(str1);
strcpy(str2,str1);
strrev(str2);
if(strcmp(str1,str2)==0)
printf("it is a palindrome");
else
printf("not a palindrome");
getch();
return 0;
}
No comments:
Post a Comment