fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string s;
  6. int count = 0;
  7. while (cin >> s) count++;
  8. cout << count;
  9. }
Success #stdin #stdout 0s 15232KB
stdin
Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it.
stdout
43