Quick Help Simple Question
I am having problems writing a function that calculates the average of 5 numbers inputted by user. This is all very confusing to me and has been eversince they were introduced. I am not sure which parameters to use i think it should look like
int funcAverage (int numbers, int sum)
really do not know how to write the definition and this is where I need help. I am not sure which variables go where. I dont want you guys to do the work for me, I just need soeone to explain how this all goes together. I am at a point of complete frusteration and am ready to quit.
Re: Quick Help Simple Question
Since the program only requires 5 numbers should I harcode that into the function
ie.
int funcAverage(int num1, int num2, int num3, int num4, int num5, int sum)
Re: Quick Help Simple Question
int funcAverage(int num1, int num2, int num3, int num4, int num5, int sum) would be the simplest or you could put the *******s in an array and pass by address
Re: Quick Help Simple Question
Code:
int Average(int array[5]);