Bob103

File

Mar 31st, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.  
  10. ifstream in("input.txt");
  11. ofstream out("output.txt");
  12. string s; unsigned min = 10;int num = 0;
  13. while (in.peek() != EOF)
  14.  
  15. {
  16. getline(in, s);
  17. for (int i = 0; i < s.length();i++)
  18. {
  19. if (s.length() < min)
  20. num++;
  21. }
  22. out << num << endl;
  23. }
  24. in.close();
  25. out.close();
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment