12345678910
#include <iostream> #include <iterator> #include <algorithm> using namespace std; int main() { cout << "Type a word and press enter:\n"; copy( istream_iterator<char>( cin ), {}, ostream_iterator<char>( cout, "\n" ) ); }