i need to create a palindrome program. in our computer lab, this program works but here at home, it doesn't. help..
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
int main()
{
clrscr();
char word[20],rev[20],chr;
cout<<"This porgram checks if the word is a PALINDROME word.\n";
do
{
cout<<"\nEnter word: ";
cin>>word;
for(int i=0,j=strlen(word)-1;i<=j,j>=0;i++,j--)
rev[i]=word[j];
if(strcmp(rev,word)==0)
cout<<"The word "<<word<<" is PALINDROME.";
else
cout<<"The word "<<word<<" is NOT PALINDROME.";
cout<<"\n\nTRY AGAIN? [Y]";
cin>>chr;
}
while(chr=='y'||chr=='Y');
getch();
return 0;
}