Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- //#include <vector>
- //#include <cmath>
- //#define n 3
- using namespace std;
- int main()
- {
- ifstream cin("input.txt");
- string name = "";
- short i = 0;
- while(!cin.eof() && name != "Petr")
- {
- i++;
- getline(cin, name);
- }
- cout<<i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement