/* Write a function float average ( int n ) that accepts one parameter that indicates amount of float numbers that your function reads from the user. The function returns the average of the input numbers. For example, if the parameter is 4 and user input 1.0, 2.0, 3.0, 4.0 , function returns 2.5 ( (1.0 + 2.0 + 3.0 + 4.0)/4). Write a program, that reads one integer that indicates the amount of the input numbers. The program uses function average to find an average of the input numbers. */ #include float average (int); int main(){ int n; printf("enter number of inputs\n"); scanf("%d",&n); if(n>0) printf("average is %f\n",average(n)); else printf("empty input\n"); return 0; } float average (int n){ float num, sum=0.0; int i; printf("enter %d floating point numbers\n",n); for(i=0;i