fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main()
  5. {
  6. string napis;
  7. char pomoc;
  8. int n;
  9. while (getline(cin, napis))
  10. {
  11. n = napis.size();
  12. for (int i = 0; i < n; i++)
  13. {
  14. if (napis[i] == ' ')
  15. {
  16. pomoc = napis[i + 1];
  17. pomoc -= 32;
  18. cout << pomoc;
  19. i++;
  20. }
  21. else
  22. cout << napis[i];
  23. }
  24. cout << endl;
  25. }
  26. return 0;
  27. }
Success #stdin #stdout 0s 4288KB
stdin
Dzisiaj jest czwartek,
A jutro bedzie piatek.
stdout
DzisiajJestCzwartek,
AJutroBedziePiatek.