Question: Write a program to input temperatures for any number of days and then output the average for just the even days. You must: Create a

Write a program to input temperatures for any number of days and then output the average for just the even days. You must: Create a vector of doubles called temperatures. Use a loop to Prompt the user for temperatures. Add them to the vector. Have some way for the user to indicate when they want to stop entering temperatures. Use a second loop to find the sum of the temperatures on even days (the even index temperatures are 0,2,4,6, etc.). Print the average of the even day temperatures showing only two decimals of precision

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 Programming Questions!