#include<iostream>
#include<string>
#include<cctype>
using namespace std;
bool huiwen(std::string &st)
{
int n =st.size();
int i ,j;
for(i=0,j=n-1;i<n/2;i++,j--)
{
if(st[i]!=st[j])
return false;
}
return true;
}
int main()
{
std::string st;
bool result;
while(getline(cin,st)&&st!="quit")
{
result= huiwen(st);
cout<<"result :"<<result;
cin.get();
}
system("pause");
return 0;
}
#include<string>
#include<cctype>
using namespace std;
bool huiwen(std::string &st)
{
int n =st.size();
int i ,j;
for(i=0,j=n-1;i<n/2;i++,j--)
{
if(st[i]!=st[j])
return false;
}
return true;
}
int main()
{
std::string st;
bool result;
while(getline(cin,st)&&st!="quit")
{
result= huiwen(st);
cout<<"result :"<<result;
cin.get();
}
system("pause");
return 0;
}