#include <iostream>
using namespace std;
#include <fstream>
int main() {
    int i,n, a[100];
     fstream myfile ("test.txt",ios::in|ios::out);
     if (!myfile.is_open()){
     cout<<"error";
      }
      cout<<"  enter n:";
      cin>>n;
      cout<<"  enter data:";
      for(i=0;i<n;i++){
      cin>>a[i];
      myfile<<a[i]<<endl;
      }
      cout<<"  information is:";
      for(i=0;i<n;i++){
      myfile>>a[i];
      cout<<" "<<2*a[i]<<",";
      }

      myfile.flush();
            myfile.close();
   return 0;
}
