#include <stdio.h>
#define PI 3.1416
int
main (void)
{
int a, b, c, d, e, total;
FILE *f1, *f2, *f3;
f1 = fopen ("file1.dat", "r");
f2 = fopen ("file2.dat", "r");
fscanf (f1, "%d%d%d", &a, &b, &c);
fscanf (f2, "%d%d%, &d, &e);
total = a + b + c + d + e;
fclose (f1);
fclose (f2);
f3 = fopen ("total.dat", "w");
printf ("Read from first file: %d %d %d\n", a, b, c);
printf ("Read from second file: %d %d\n", d, e);
printf ("The sum is: %d\n\n", total);
fprintf ("f3, "%d", total);
printf ("\nFILE total.dat CREATED.\n");
fclose (f3);
return (0);
}