Question #212955

identify the purpose and components of the method represented in the pseudocode below:

num calcAvarage(num total)

declarations

num avarage

set avarage = total/2

return avarage


Expert's answer

The method takes the sum of two numbers and returns the average.

Structure: a numerical variable average is declared, after which it is assigned a half-sum (which is the average for two numbers), after which the variable average is returned by the method.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS