Question: Please only FIX where I went wrong so that the correct output is given, do not redo the whole question. Also, please use very BASIC
Please only FIX where I went wrong so that the correct output is given, do not redo the whole question. Also, please use very BASIC level C++ programming like that used in my sample input.



PPLcdbfhbsdjfvfdv
1 /Includes and Define Max Array Sizd 2 #include #include 4 #define MAN 100 5 6 Prototype functions 7 loat arithmetic(floatx, int n)5 8 float geometric(float*x, int n)j 9 float harmonic(float*x, int r) 10 11 //Open Program 12 int main(void) 13 14 15 16 17 18 19 20 21 Declare Variables float x[MAXN]; float aavg, gavg, havgj int n-0; Declare and Open FILES FILE*finfopen( "samples.txt", "r"); FILE fout-fopen( "samplesout.txt", "W") / Read values into x using a while Loop while(fscant(fin, "%f", &x(n)) !-EOF){ 23 24 25 26 27 28 29 30 31 32 Call the three functions aavg arithmetic(x, n); gavg - geometric(x, n); havg-harmonic(x, n); Print the results to the Output FILE fprintf(fout, "arithmetic average n", aavg)5 fprintf(fout, "geometric average-%f ", gavg); 34 35