Advertisement
chiva13

Untitled

Aug 28th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <fstream>
  4. #include <string>
  5. using namespace std;
  6.  
  7. int main()
  8. {      
  9.     std::string string1;
  10.     std::ifstream ist("input.txt");
  11.  
  12.     int n=0;
  13.     while(n<10)
  14.     {
  15.         std::getline (ist,string1);
  16.         std::cout << string1<<"\n";
  17.         if (ist.eof()){ return 0;}
  18.         n++;
  19.     }
  20.     cout << string1 << "\n";
  21.     system("pause");
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement