#include <bits/stdc++.h>
using namespace std;
int main()
{
fstream file;
ofstream ofile("file.txt", ios::out | ios::app);
if (!ofile.is_open()) {
cout << "file not found";
}
else {
string s;
getline(cin,s);
ofile << s;
cout<<"\nfile stored the line...!";
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKCWZzdHJlYW0gZmlsZTsKCW9mc3RyZWFtIG9maWxlKCJmaWxlLnR4dCIsIGlvczo6b3V0IHwgaW9zOjphcHApOwoKCWlmICghb2ZpbGUuaXNfb3BlbigpKSB7CgoJCWNvdXQgPDwgImZpbGUgbm90IGZvdW5kIjsKCX0KCWVsc2UgewoKCQlzdHJpbmcgczsKICAgICAgICBnZXRsaW5lKGNpbixzKTsKICAgICAgICBvZmlsZSA8PCBzOwoJCWNvdXQ8PCJcbmZpbGUgc3RvcmVkIHRoZSBsaW5lLi4uISI7Cgl9CgoJcmV0dXJuIDA7Cn0K