Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream in("Input.txt");
- ofstream out("Output.txt");
- string s;
- int min, row,i;
- min = 10;
- while (in.peek() != EOF)
- {
- in >> s;
- int count = s.size();
- if (count< min)
- {
- min = count;
- row = i;
- }
- }
- out << row <<endl;
- in.close();
- out.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment