#include <iostream>
#include <fstream>
#include <conio.h>
using namespace std;
class AbClass {
	public :	
		unsigned long int Eshterak, Masraf;
};
int main()
{
	AbClass AbRec;
	int i;
	ofstream myfile("d:\\106_Sample_File.dat", ios::out);
	for (i=1; i <= 15; i++)
	{
		cout << i << "- eshterak ra vared konid : ";
		cin >> AbRec.Eshterak;
		cout << "masraf ra vared konid : ";
		cin >> AbRec.Masraf;
		myfile.write((char *)&AbRec, sizeof(AbRec));
	}
	myfile.close();
	getch();
}

