Question: C++ Write out a void function with prototype as part of a full program called averageTemperature() that asks the user to enter integers with a

C++

Write out a void function with prototype as part of a full program called averageTemperature() that asks the user to enter integers with a sentinel value of -999 to stop entering numbers. Then average the numbers and print the average.

You will need an int accumulator for the temperatures and an int accumulator for the number of temperatures entered. Use the accumulators to calculate the average which will need to be a decimal number.

Call the function from the main() function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!