fork download
  1. #include <iostream>
  2. #include <sstream>
  3. using namespace std;
  4.  
  5. int main() {
  6. string inputstr("Ivanov Sidor Efremovich");
  7.  
  8. stringstream temp(inputstr);
  9. string F,I,O;
  10. temp>>F>>I>>O;
  11. string outstr=string("")+I[0]+"."+O[0]+". "+F;
  12.  
  13. cout<<outstr;
  14. return 0;
  15. }
Success #stdin #stdout 0s 4348KB
stdin
Standard input is empty
stdout
S.E. Ivanov