#include<bits/stdc++.h> using namespace std; int main() { string word, ans; while (cin >> word) { ans += toupper(word[0]); } cout << ans; return 0; }
循环读取每个字符串并转换首字母为大写并拼接到ans上即可