//Header files
#include<stdio.h>
#include<conio.h>
#include<string.h>
//Main function
void main()
{
char mystring[20];
int i,length;
int flag=0;
//Function for clearing screen
clrscr();
printf("Enter a string:");
scanf("%s",mystring);
length=strlen(mystring);
for(i=0;i<length;i++)
{
if(mystring[i]!=mystring[length-i-1])
{
flag=1;
break;
}
}
if(flag)
{
printf("%s is not a palidrome",mystring);
}
else
{
printf("%s is a palidrome",mystring);
}
//Function for holding screen
getch();
}