fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. int cont = 0;
  7. string s;
  8. while(getline(cin, s)) ++cont;
  9. cout << cont;
  10. // your code goes here
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty