//#include <algorithm>
#include <string>
#include <iostream>
using namespace std;
//bool IsPalindrome(char *s);
bool IsPalindrome(string s);
void main()
{
//char StrPalindrome[256];
string StrPalindrome;
while(1)
{
cin>>StrPalindrome;
//gets(StrPalindrome);
if(IsPalindrome(StrPalindrome))
{
cout<<"Your Input is Palindrome"<<endl;
}
else
{
cout<<"Your Input is not丂Palindrome"<<endl;
}
}
}
bool IsPalindrome(string s)
//bool IsPalindrome(char *s)
{
int len=s.length();
//int len=strlen(s);
for(int i=0;i<len/2;i++)
{
if(s[i]!=s[len-i-1])
{
return false;
}
}
return true;
//return equal(s.begin(),s.end(),s.rbegin());
}
#include <string>
#include <iostream>
using namespace std;
//bool IsPalindrome(char *s);
bool IsPalindrome(string s);
void main()
{
//char StrPalindrome[256];
string StrPalindrome;
while(1)
{
cin>>StrPalindrome;
//gets(StrPalindrome);
if(IsPalindrome(StrPalindrome))
{
cout<<"Your Input is Palindrome"<<endl;
}
else
{
cout<<"Your Input is not丂Palindrome"<<endl;
}
}
}
bool IsPalindrome(string s)
//bool IsPalindrome(char *s)
{
int len=s.length();
//int len=strlen(s);
for(int i=0;i<len/2;i++)
{
if(s[i]!=s[len-i-1])
{
return false;
}
}
return true;
//return equal(s.begin(),s.end(),s.rbegin());
}
梦想与现实的落差,就是我们离成功的距离~