Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main()
- {
- char c;
- cin >> c;
- ifstream in("input.txt");
- while (in.peek() != EOF)
- {
- string s;
- getline(in, s);
- if (s[0] == c)
- cout << s << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement