注意1:tolower(c) 和 toupper(c)等函数都是针对单个字符的函数
注意2:使用tolower()和toupper(c)等函数时,要引入头文件cctype
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main()
{
string s1, s2;
getline(cin, s1);
getline(cin, s2);
for (auto &c : s1) c = tolower(c);
for (auto &c : s2) c = tolower(c);
if (s1 > s2) cout << ">" << endl;
else if (s1 < s2) cout << "<" << endl;
else cout << "=" << endl;
return 0;
}