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