i have a problem with my coding to fing wether given string is palindrome or not
without using strcmp(); and srtrev();
it returns "the string is not a palindrome " for all string
the
#include<stdio.h>
#include<string.h>
void main()
{
int n,i,j;
char a[100];
scanf("%s",a);
n=strlen(a);
printf("the length ia%s,%d\n",a,n);
while(i<=j)
{ i=0;j=n;
if(a[i]==a[j])
{
i++;
j--;
}
else
break;
}
if(i==j)
{
printf("the no is palindrome\n");
}
else
{
printf("this is not palindrome\n");
}
}