Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do NOT use stod Homework #9 Processing Temperature Readings from a File Assigned: November 8, 2017 Due: Nov. 15 by 11:59:59 PMM Write a C++

image text in transcribed
image text in transcribed
image text in transcribed
Do NOT use stod
Homework #9 Processing Temperature Readings from a File Assigned: November 8, 2017 Due: Nov. 15 by 11:59:59 PMM Write a C++ program which reads data from a file and processes it as listed in the Requirements Download the file "Data file for assignment9 from Blackboard to your account in the lab and save it with the filename temperature.dat. This file contains a week of hourly temperature data with one line for each of the 7 days, where each line contains 24 integers (separated by spaces) which are the temperatures in Fahrenheit for each hour of the day. This is a text file and you can open it and view the data uirements: .Name your source file program9.cpp .Make an array with the definition: double celcius[7 [24] Read in the data from the file temperature.dat, convert each value to celcins, and save the celcius temperatures in this array Write a function with the following prototype: void show_warmer (double temperature [24], int days, double cutoff); This function takes a parameter temperature which is a two-dimensional array of some num- ber of days, of 24 hours each. The second parameter days is the number of days for which to access the array temperature. The third parameter cutoff is a value which elements of temperature are compared to in looking for values which are larger. This function needs to print out the values which it finds in the format of the example below (e.g. the output line "At day 2, hour 19, the temperature was 22.78 C."). . Prompt the user to enter a value, and then call the function show.arerusing the value entered by the user for the cutoff parameter. (The prompts and layout must look like the example below.) Write a function with the following prototype: double find_average(double temperature[ [24], int days); This function takes a parameter temperature which is a two-dimensional array of some num- ber of days, of 24 hours each. The second parameter days is the number of days for which to access the array tempe values in temperature. It must not print anything on the screen. rature. This function needs to find and return the average of all the

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What styles do they use?

Answered: 1 week ago