Advertisement
Infiniti_Inter

55 1 (7)

May 14th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     char c;
  10.     cin >> c;
  11.     ifstream in("input.txt");
  12.     while (in.peek() != EOF)
  13.     {
  14.         string s;
  15.         getline(in, s);
  16.         if (s[0] == c)
  17.             cout << s << endl;
  18.     }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement