#45451: 下面那個人的答案很爛 看我的


1121228@stu.wghs.tp.edu.tw (你知道我是誰嗎!!??)

學校 : 臺北市私立薇閣高級中學
編號 : 266561
來源 : [60.248.154.139]
最後登入時間 :
2025-08-21 12:45:57

#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    while (getline(cin, s) && s != "END") {
        stringstream ss(s);
        string word;
        while(ss >> word){
            cout << char(toupper(word[0]));
        }
        cout << ' ' << word << endl;
    }
    return 0;
}

#45454: Re: 下面那個人的答案很爛 看我的


1121226@stu.wghs.tp.edu.tw (Arthur✨EC)

學校 : 臺北市私立薇閣高級中學
編號 : 252772
來源 : [60.248.154.139]
最後登入時間 :
2025-08-21 12:59:45

#include
using namespace std;

int main() {
    string s;
    while (getline(cin, s) && s != "END") {
        stringstream ss(s);
        string word;
        while(ss >> word){
            cout << char(toupper(word[0]));
        }
        cout << ' ' << word << endl;
    }
    return 0;
}

我無言