Advertisement
Guest User

Untitled

a guest
May 19th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. /* Глава 1. Упражнение 7 */
  2.  
  3. #include <iostream>
  4. #include <cstdlib>
  5. #include <cstdio>
  6. #include <fstream>
  7. #include <string>
  8.  
  9. using namespace std;
  10.  
  11. int main(int argc, char *argv[])
  12. {
  13.     ifstream in("main.cpp");
  14.  
  15.     string line;
  16.     while (getline(in, line)) { // считать строку
  17.         cout << line;
  18.         char x = 0;
  19.         do {
  20.             cin.get(x);
  21.         } while (x != 10); // ждать Enter
  22.     }
  23.  
  24.     return EXIT_SUCCESS;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement