fork(2) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. string tekst;
  7. int dlugoscTekstu, iloscSpacji=0;
  8. char toUp;
  9.  
  10. int main()
  11. {
  12. getline(cin,tekst);
  13.  
  14. dlugoscTekstu=tekst.length();
  15.  
  16. for(int i=0;i<dlugoscTekstu;i++)
  17. {
  18. if((int)tekst[i]==32)
  19. {
  20. if(i<dlugoscTekstu-1)
  21. {
  22. putchar(toupper(tekst[i+1]));
  23. i++;
  24. }
  25.  
  26. }
  27. else
  28. cout << tekst[i];
  29.  
  30. }
  31.  
  32. return 0;
  33. }
  34.  
Success #stdin #stdout 0s 4816KB
stdin
Standard input is empty
stdout
Standard output is empty