Question: basic c++ 1. Write a program that uses a dynamic array to compute the information about temperatures over a set of days. The first line

 basic c++ 1. Write a program that uses a dynamic array

basic c++

1. Write a program that uses a dynamic array to compute the information about temperatures over a set of days. The first line of your file has a number that specifies how many temperatures follow. The next number of lines contain the temperatures. For example, your data file might look as follow 62 70 71 71 70 59 59 Your program should do the following: 1) Declare an int pointer Temperature which will be used for the dynamic array 2) Declare an int variable numDays 3) Read in the number of days for which temperatures will be computed 4) Dynamically allocate an array large enough to hold that many days 5) Read the temperatures for each day into the array (use pointer notation) 6) Calculate the average temperature (use pointer notation) 7) Print out the result

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!