Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main(){
- string s,d;
- ofstream k("t1.txt");
- int a;
- cin>>a;
- if(a>3){
- while(k.is_open()){
- getline(cin,s);
- k<< s;
- k.close();
- }}
- ifstream r("t1.txt");
- while(r.is_open()){
- getline(r,d);
- cout<<d;
- r.close();
- }
- }
Add Comment
Please, Sign In to add comment