#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;
}
  1. 使用字符串流对字符串进行分割
  2. 使用 toupper 函数对字符大写转换