Advertisement
Pafnytiu

файл 1 - 16

Feb 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. #include<string>
  4. using namespace std;
  5. int main()
  6. {
  7. int i=0;
  8. ifstream in("in.txt");
  9. ofstream out("out.txt");
  10. string s;
  11. while ( in.peek() != EOF)
  12. {
  13. i ++;
  14. getline(in,s);
  15. out << s << " ";
  16. out <<i<<endl;
  17. }
  18. in.close();
  19. out.close();
  20. system("pause");
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement