Please help me to Write a program that takes a list of characters from user and checks whether the character
list is palindrome or not.
A palindrome is a string that is spelled the same way forwards and backwards.
For Example:
Madam
Civic
Radar
Pop
Code:
#include<iostream.h>
#include<string.h>
int main()
{
char str[25],str1[25];
cout<<"Enter a string: ";
cin>>str;
strcpy(str1,str);
strrev(str);
if(strcmp(str,str1)!=0)
{
cout<<"string is not palindrome";
}
else
{
cout<<"string is a palindrome";
}
cout<<endl;
system("pause");
return 0;
}
Thanks Man!!!
it helps a lot
(13-05-2009 09:01 PM)Skidro Wrote: [ -> ]Thanks Man!!!
it helps a lot
no problem ... you are welcome
Hello Friends.
I read your entire post it is too useful for me because of I'm also a student of computer science so I have knowledge of c and c++ well it is good news for me I got the such type of site and friends and I share my problems.