Code:

#include <stdio.h>
#include <stdlib.h>
// NOT NEEDED
// YOU'RE NOT USING ANY MATH FUNCTIONS
//JUST DOING BASIC MATH WITHOUT FUNCTIONS TO
//DO THEM FOR YOU
//#include <math.h>
/*** MY TEST FILE IS THIS
3.900000
3.700000
4.200000
1.000000
6.100000
9.700000
*
* total 28.6 / 6 = adv 4.7666 rounded 4.77
*
* ****/
#define MAX_SZ 300
int main()
{
int data[MAX_SZ]; // ARRAY TYPE INT you're using double
int Fsize = 0;
int i=0; //array of data
double data_in, min=0.0, max=0.0; //max and min of data set
double sum = 0.0, avg; //average, standard deviation, range of data set
// YOUR CODE
// NO ARRAY BEING FILLED
// the only thing inside of your array is crap memory/data values
// given to it by the computer it is running on.
FILE *fpin;
fpin = fopen("data.txt","r");
for(i=0;i<199;i++)
{
fscanf(fpin, "%lf", &data_in); // NO ARRAY BEING FILLED
if (data[i]>max) // NO ARRAY VALUES TO READ
{
max = data[i]; // NO ARRAY VALUES TO ASSIGN
}
if (data[i]<min) // NO ARRAY VALUES TO READ
{
min = data[i]; // NO ARRAY VALUES TO ASSIGN
}
}
for(i=0;i<199;i++)
{
fscanf(fpin, "%lf", &data_in);
sum += data[i]; // NO ARRAY VALUES TO ADD UP
avg = sum / 200.0; // NO REAL RESULTS
}
printf("\n\n scotdani code\n\n");
printf("The sum value of this data set is %.02lf.\n\n", sum);
printf("The minimum value of this data set is %lf.\n", min);
printf("The maximum value of this data set is %lf.\n", max);
printf("The average value of this data set is %lf.\n", avg);
printf("----------------------------------------------------\n");
printf("----------------------------------------------------\n");
printf("\n");
// OPERATION ONE
// DOES COMPUTATIONS AND FILLS ARRAY AT SAME TIME
// PROPER DATA TYPE ARRAY OF DOUBLE
double data1[MAX_SZ] = { 0.0 };
// reset everything
fseek(fpin, 0, SEEK_SET);
// SET MIN TO GREATER THAN 0.0 THAT IS THE LOWEST
//IT WILL PRODUCE FALSE READING IF DATA IN FILE IS GREATER THAN 0.0
//NOTHING IN FILE CAN GET LOWER THAN 0.0 UNLESS IT IS -NEG THEN
//THAT IS NEGATIVE ISN'T IT. -1.0, 0.0, 0.1
sum = 0.0 , min=9999999990.0, max=0.0, avg = 0.0, data_in = 0.0; // reset values
Fsize = 0;
// makes array obsolete because everything
// is being done while reading
//the data and storing it into the array.
// this only makes the
// array useful if user needs it
// for later on.
while(!feof(fpin)) // seeks for end of file when found loops stops.
{
fscanf(fpin, "%lf", &data1[Fsize]);
if (data1[Fsize]>max)
{
max = data1[Fsize];
}
if (data1[Fsize]<min)
{
min = data1[Fsize];
}
sum += data1[Fsize];
Fsize++; // moves the array elements by value inside of it
}
//avg = sum / 200.0;
avg = sum / 6.0;
printf("The sum value of this data1 set is %.02lf.\n\n", sum);
printf("The minimum value of this data1 set is %.02lf.\n", min);
printf("The maximum value of this data1 set is %.02lf.\n", max);
printf("The average value of this data1 set is %.02lf.\n", avg);
printf("----------------------------------------------------\n");
printf("\n");
// OPERATION TWO
// DOES COMPUTATIONS WITHOUT USE OF AN ARRAY
//reset everything
fseek(fpin, 0, SEEK_SET);
sum = 0.0 , min=9999999990.0, max=0.0, avg = 0.0, data_in = 0.0;
Fsize = 0;
// here the same thing
// is taking place
// without storing
// data into a contaner typed
// as an array
for(i=0;i<6;i++)
{
fscanf(fpin, "%lf", &data_in);
if (data_in>max)
{
max = data_in;
}
if (data_in<min)
{
min = data_in;
}
sum += data_in;
}
//avg = sum / 200.0;
avg = sum / 6.0;
printf("The sum value of this data1 set is %.02lf.\n\n", sum);
printf("The minimum value of this data1 set is %.02lf.\n", min);
printf("The maximum value of this data1 set is %.02lf.\n", max);
printf("The average value of this data1 set is %.02lf.\n", avg);
printf("----------------------------------------------------\n");
printf("\n");
// OPERATION THREE
// FILLS ARRAY THEN DOES THE COMPUTATIONS ON DATA WITHIN SAME ARRAY
// reset everything
fseek(fpin, 0, SEEK_SET);
for ( int i = 0; i<MAX_SZ; i++) data1[i] = 0.0;
sum = 0.0 , min=9999999990.0, max=0.0, avg = 0.0, data_in = 0.0;
Fsize = 0;
while(!feof(fpin))
{
// fills an array type double
fscanf(fpin, "%lf", &data1[Fsize]);
Fsize++; // get actual count of size used as well
}
for ( i = 0; i < Fsize; i++)
{
if (data1[i]>max)
{
max = data1[i];
}
if (data1[i]<min)
{
min = data1[i];
}
sum += data1[i];
}
//avg = sum / 200.0;
avg = sum / 6.0;
printf("The sum value of this data1 set is %.02lf.\n\n", sum);
printf("The minimum value of this data1 set is %.02lf.\n", min);
printf("The maximum value of this data1 set is %.02lf.\n", max);
printf("The average value of this data1 set is %.02lf.\n", avg);
printf("\n");
fclose(fpin); // Close File after Reading
return 0;
}

Results