#include <stdio.h>
int main ()
{
	FILE *f;
	struct rec {
		unsigned long int Eshterak, Masraf;
	} AbRec;
	int i;
	double Sum=0;
	f = fopen("d:\\107_Sample_File.dat", "r+b");
	for (i=1; i <= 15; i++)
	{
		fread(&AbRec, sizeof(struct rec), 1, f);
		Sum += AbRec.Masraf;
	}
	fclose(f);
	printf("Jame Masraf = %g\n", Sum);
	getch();
}

