fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int t;
  5. cin >> t;
  6. cin.ignore();
  7. while(t--){
  8. string s;
  9. getline(cin,s);
  10. stringstream ss(s);
  11. string word;
  12. while(ss >> word){
  13. word[0] = toupper(word[0]);
  14. for(int i = 1; i < word.length();i++){
  15. word[i]=tolower(word[i]);
  16. }
  17. cout << word<<" ";
  18. }
  19. cout << endl;
  20. }
  21. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
Standard output is empty