#include #include #include using namespace std; // Read in a single line of input // and write out the words from it, // one word per line. (A word is // nonwhitespace characters.) int main(int argc, char* argv[]){ string line, word; if(!getline(cin, line)){ cerr << "couldn't read in a line of input" << endl; return 1; } istringstream lineStream(line); while(lineStream >> word){ cout << word << endl; } return 0; }