#include<stdio.h>
#include<string.h>
int main()
{
int i,j,length;
char anik[1000],rob[1000];
gets(anik);
length = strlen(anik);
for(i=length-1,j=0; i>=0; i--,j++)
{
rob[j] = anik[i];
}
rob[j] = '\0';
if(strcmp(anik,rob) == 0)
{
printf("Palindrome\n");
}
else
{
printf("No,just a muggle string\n");
}
return 0;
}
#include<string.h>
int main()
{
int i,j,length;
char anik[1000],rob[1000];
gets(anik);
length = strlen(anik);
for(i=length-1,j=0; i>=0; i--,j++)
{
rob[j] = anik[i];
}
rob[j] = '\0';
if(strcmp(anik,rob) == 0)
{
printf("Palindrome\n");
}
else
{
printf("No,just a muggle string\n");
}
return 0;
}
Comments
Post a Comment