Question: Using CPP Syntax _____ _____________________________________________________________ Temperature.txt April 6, 2010 24 88 72 52 36 73 48 89 72 97 84 61 41 48 37 68
Using CPP Syntax


_____
_____________________________________________________________
Temperature.txt
April 6, 2010 24 88 72 52 36 73 48 89 72 97 84 61 41 48 37 68 45 88 63 79 52 48 21 55 46 54 41 97 81 55 37 79 70 72 43 68 45 102 80 57 39 37 32 45 28 66 45 59 36
Step 1) Read the data from the temperature.txt file into an appropriate data store. The data store needs to meet the needs of the rest of the program so we need to have a general understanding of the rest of the program to be able to decide what is appropriate. In this case, two arrays of integers to store the temperatures, a string for the date and an integer for the number of entries will do. Complete and debug all of step one before proceeding. Temperature.txt Use getline and >> to read the data. High temps [] String date Low tempsl] Int num of entries Step 2) Find highest, lowest, calculate average, etc. Complete and debug before proceeding. Step 3) Populate histogram print intermediate data: String String labels[] counti We want to have two arrays that contain the data we need to print the histogram. The first one, string label, contains constant strings which are the labels such as "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
