Wrong OUTPUT ,HELP !
//to check whether the string is palindrome or not
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
void main ()
{
clrscr();
char s[50];
int i,l,j,flag=0;
cout<<"Enter string :";
gets(s);
l=strlen(s);
for(i=0,j=l-1;i<l,j<1;i++,j--)
{
if(s[i]==s[j])
flag=1;
}
if(flag==1)
cout<<"\nThe string is a palindrome";
else
cout<<"\nthe string is not a palindrome";
getch();
}