Question: ( IN CORAL PROGRAMMING ONLY PLEASE ) 1 0 . 4 Copy of LAB: User - Defined Functions: Compute Average Define a function named computeAverage
IN CORAL PROGRAMMING ONLY PLEASE
Copy of LAB: UserDefined Functions: Compute Average
Define a function named computeAverage that takes one parameter: an array of integer and outputs an integer that is the average of the all
integers in the array
Write a main program that reads integers from input. The first integer is the size of an array.. All other integers will be values of the array.
Then the program calls function computeAverage with the array as arguments. Function computeAverage will return the average of all
integers in the array. Then the main program output the result
Ex: if the input is:
where is the size of the array, the output is:
Your program should define and use a function:
Function computeAverageinteger array userVals returns integer average
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
