fork(3) download
  1. #include <iostream>
  2. #include <cctype>
  3. using namespace std;
  4. int main()
  5. {
  6. string text;
  7. while (getline(cin, text))
  8. {
  9.  
  10. for (int i = 0; i < text.length(); i++)
  11. {
  12. if (text[i] == ' ')
  13. {
  14. text.erase(text.begin() + i);
  15. text[i] = toupper(text[i]);
  16. }
  17. }
  18. cout << text << endl;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5420KB
stdin
Standard input is empty
stdout
Standard output is empty