I wrote a C program and I compile with Miracle C - a C compiler software, the program was compiled successfully but does not do any calculations under it. All the calculations I put there was not done, I included math.h and stdio.h, is there anything I am doing wrong??
Below is the program:
I need help urgently!!!!!
/* program to calculate the geometric and arithmetric average of a set of numbers*/
float y, x, xavg, xavg1, temp=1.0, sum=0.0;
int count=1, n;
printf ("\nEnter the total items to calculate\n");
scanf ("%d", &n);
printf ("\nEnter x\n");
scanf ("%f", &x);
y = 1/n;
xavg= pow(temp, y);
printf ("\nThe geometric average is %f\n", &xavg);
printf ("\nThe arithmetric average is %f\n", &xavg1);