fork(4) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. string xx,yy[1000000];
  5.  
  6. int x,z,y;
  7.  
  8.  
  9. int main()
  10. {
  11. while(getline(cin,xx))
  12. {
  13. x=xx.length();
  14.  
  15.  
  16. z=0;
  17. xx[0]=toupper(xx[0]);
  18. y=0;
  19. for(int i=0;i<x;i++)
  20. { if(y==1 && xx[i]!=' ') xx[i]=toupper(xx[i]);
  21. y=0;
  22. if(xx[i]==' ')
  23. {
  24. y=y+1;
  25. z=z+1;
  26. }
  27. else yy[i-z]=xx[i];
  28.  
  29.  
  30. }
  31.  
  32. for(int i=0;i<(x-z);i++) cout<<yy[i];
  33. cout<<endl;
  34.  
  35.  
  36.  
  37. }
  38.  
  39.  
  40. return 0;
  41. }
  42.  
Success #stdin #stdout 0.01s 34932KB
stdin
Standard input is empty
stdout
Standard output is empty