Bob103

я тупой

Apr 3rd, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 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;
  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. }
  23. out << row <<endl;
  24. in.close();
  25. out.close();
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment