Bob103

готово)

Apr 3rd, 2016
59
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. int main()
  7. {
  8. ifstream in("Input.txt");
  9. ofstream out("Output.txt");
  10. string s;
  11. int min, row, i = 1;
  12. min = 10;
  13. while (in.peek() != EOF)
  14. {
  15. in >> s;
  16. int count = s.size();
  17. if (count < min)
  18. {
  19. min = count;
  20. row = i;
  21. }
  22. ++i;
  23. }
  24. out << row << endl;
  25. in.close();
  26. out.close();
  27. return 0;
  28. }
Add Comment
Please, Sign In to add comment