保证AC
2025-12-07 17:54:16
发布于:四川
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
// 定义字符串变量
string s;
// 输入字符串变量
cin >> s;
// 遍历整个字符串 0--长度-1
for (int i = 0; i <= s.size() - 1; i++){
// 判断是否为小写字母 -32
if (s[i] >= 'a' && s[i] <= 'z'){
s[i] -= 32;
}
}
// 输出
cout << s;
}
这里空空如也





有帮助,赞一个