	#include <iostream>
	#include <fstream>
	using namespace std;
	int main() {
	int i,n;
float  arr[100],barr[100];
	fstream myfile("test.dat",ios::out|ios::binary);
	if (!myfile.is_open()){
	cout<<"error";
	}
	cout<<"  enter n:";
	cin>>n;
	cout<<"  enter data:";
	for(i=0;i<n;i++){
	cin>>arr[i];
	}
	myfile.write((char *)(arr),sizeof(float));
		myfile.flush();
	myfile.seekp(0);
	cout<<"information is:";
	myfile.read((char *)(barr),sizeof(float));
	for(i=0;i<n;i++){
	cout<<"  "<<barr[i]*2+barr[i]<<"  ";
	}
	myfile.close();
	return 0;
	}
