題目傳送門
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
//方式1
for (int i = 0; i < s.size(); i++)
printf("%c", toupper(s[i]));
printf("\n");
//方式2
for (int i = 0; i < s.size(); i++)
printf("%c", s[i] >= 'a' && s[i] <= 'z' ? s[i] - 32 : s[i]);
printf("\n");
//方式3
transform(s.begin(), s.end(), s.begin(), ::toupper);
printf("%s\n", s.c_str());
return 0;
}