fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. char ch;
  6. for(int i = 0; i < 8 && std::cin >> ch && std::cout << ch && ((i == 3 || i == 5) && std::cout << std::endl || std::cout << std::flush); ++i){}
  7. }
  8.  
Success #stdin #stdout 0s 3344KB
stdin
12345678
stdout
1234
56
78