This question is complete and as it given by the professor) Consider the following declaration: const int NUM_DEPTS=10; //number of departments const int NUM_MONTHS=6; //number of months double sales[NUM_DEPTS][NUM_MONTHS]; //array to hold department sales double aveSales[NUM_DEPTS]; //array to hold average sales of departments Suppose the array sales is already filled with each department’s sales for six months. Complete the following function definition for a void function to calculate each store’s average sales and store the results in the array aveSales. Write the function definition. Proper indentation and alignment of statements is required. void CalcAveSales(const double sales[ ][NUM_MONTHS], double aveSales[ ])
(This question is complete and as it given by the professor)
Consider the following declaration:
const int NUM_DEPTS=10; //number of departments
const int NUM_MONTHS=6; //number of months
double sales[NUM_DEPTS][NUM_MONTHS]; //array to hold department sales
double aveSales[NUM_DEPTS]; //array to hold average sales of departments
Suppose the array sales is already filled with each department’s sales for six months.
Complete the following function definition for a void function to calculate each
store’s average sales and store the results in the array aveSales.
Write the function definition. Proper indentation and alignment of statements is required.
void CalcAveSales(const double sales[ ][NUM_MONTHS], double aveSales[ ])
Step by step
Solved in 5 steps with 1 images