Guest User

Untitled

a guest
Jan 20th, 2018
93
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.  
  6. int main(){
  7. string s,d;
  8. ofstream k("t1.txt");
  9. int a;
  10. cin>>a;
  11. if(a>3){
  12.  
  13. while(k.is_open()){
  14. getline(cin,s);
  15. k<< s;
  16. k.close();
  17.  
  18.  
  19. }}
  20. ifstream r("t1.txt");
  21. while(r.is_open()){
  22. getline(r,d);
  23. cout<<d;
  24. r.close();
  25. }
  26.  
  27.  
  28. }
Add Comment
Please, Sign In to add comment