fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main()
  5. {
  6. string word;
  7.  
  8. while (cin >> word)
  9. cout << "word read is: " << word << '\n';
  10.  
  11. cout << "ok: no more words to read: bye!\n";
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 2860KB
stdin
riverrun, past Eve and Adam's
stdout
word read is: riverrun,
word read is: past
word read is: Eve
word read is: and
word read is: Adam's
ok: no more words to read: bye!