Given an array temps of double, containing temperature data, and an int variable n that contains the number of elements in temps: compute the average temperature and store it in a variable called avgtemp. besides temps, n, and avgtemp, you may use only two other variables -- an int variable k and a double variable total, which have been declared.

Solved
Show answers

Ask an AI advisor a question