//Wow 判断输入的字符串是否是回文 并且无视大小写字母
#include <string>
#include <cassert>
#include <cstddef>
#include <iostream>
using namespace std;
//逆转字符串
string cycle(const string& modify){
string kuai(modify);
for(size_t i = 0;i < modify.size()/2; i++){
string one = modify.substr(i,1);
string two = modify.substr(modify.size()-i-1,1);
kuai.replace(i,1,two);
kuai.replace(modify.size()-i-1,1,one);
}
return kuai;
}
//用toupper() 和tolower() 改变字符串的大小写 (一次只能改变一个字符的大小写)
string lowercase(const string& modify){
string kuai(modify);
for(size_t i = 0; i < modify.length();++i)
kuai[i] = tolower(kuai[i]);
return kuai;
}
int main(){
string modify(" ");
//string kuai(" ");
cout << "Please input wow:"<< endl;
cin >> modify;
modify = lowercase(modify);
if (modify.compare(cycle(modify)))
cout << "It is not Wow /n";
else
cout <<"It is Wow"<<endl;
return 0;
}