为什么90

tctm169 我以逍遥醉人间 2024-05-20 20:53:10 3

#include <bits/stdc++.h> #include #include #include #include #include #include using namespace std; int main() { string s1, s2; cin >> s1 >> s2; for (int i = 0; i <= s1.length() - 1; i++) { if (s1[i] >= 'a' && s1[i] <= 'z') s1[i] -= 32; } for (int i = 0; i <= s2.length() - 1; i++) { if (s2[i] >= 'a' && s2[i] <= 'z') s2[i] -= 32; } if (s1 < s2) { cout << "<"; } else if (s1 == s2) { cout << "="; } else { cout << ">"; } return 0; }

{{ vote && vote.total.up }}

共 1 条回复

root 站长

注意字符串中可能包含空格。