Advertisement
Pafnytiu

Файлы 1-18

Apr 26th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include<iostream>
  2. #include<stdio.h>
  3. #include<string>
  4. #include<fstream>
  5. using namespace std;
  6. int main()
  7. {
  8. int k = 0,a;
  9. cin >> a;
  10. ifstream in("in.txt");
  11. ofstream out("out.txt");
  12. string s;
  13. string::size_type size;
  14. while (in.peek() != EOF)
  15. {
  16. getline(in, s);
  17. for (unsigned int i = 0; i < s.length(); i++)
  18. {
  19. for (size = 0; !in.eof(); size++)
  20. {
  21. in.get();
  22. k++;
  23. }
  24. if (k>a)
  25. out << s << endl;
  26. }
  27.  
  28. }
  29. in.close();
  30. out.close();
  31. system("pause");
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement