#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main()
{
string str;
getline(cin, str);
stringstream ss(str);
string word, result;
while(ss >> word)
{
result += toupper(word[0]);
}
cout << result << endl;
return 0;
}
- 使用字符串流对字符串进行分割
- 使用 toupper 函数对字符大写转换

京公网安备 11010502036488号