Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a weather program in c++ Program 6 25 pts CS2010: Rex Spring, 2018 Due: Wednesday, April 11,2018 Problem: Is the Earth warming up? Are

write a weather program in c++

image text in transcribedimage text in transcribed

Program 6 25 pts CS2010: Rex Spring, 2018 Due: Wednesday, April 11,2018 Problem: Is the Earth warming up? Are the temperatures we have been experiencing recently normal fluctuations or evidence of a warming trend? Write a C++ program to analyze temperature data from March, April and May of 2017 for Ohio. Create a project using your last name, first initial and pgm for the project folder and cpp file names (e.8. WaveH pgm6 and WaveH pgm6.cpp). Your output may be displayed on the screen. Input: The temperature (in Celsius) for each day of March, April and May (92 temperatures) is stored in the file pgm6.txt. Copy this file from the Canvas class web site (Files 02 Program Assignments) to your project folder. Your project should read in each temperature and store it in the next available element of an array of type double All of the temperatures must be stored in the same array. Use the data values stored in the array to perform the steps described below. Processing: Your main function should do the following: 1. Declare the array to hold the temperatures and any other variables needed. 2. Call a function to read the daily temperatures from the file pgm6.txt, storing each temperature in an element in the array. Open and close the data file inside this function. All further processing must be done using the data values stored in the array. Temperatures in the file look like this: -5.55556 -1.66667 Call a function to display the temperatures for the month of March. Include a heading with your name, class data and two columns-one showing the day of the month and one showing the temperature for that day-see sample below. Note that the temperatures are displayed with no decimal places. 3. Temperatures for March Your Name Cs2010, Spring 2018, xx:xx Temperature Day of month (Celsuis) -6 -2 4 etc. etc. Call a function to convert all of the temperatures in the array from Celsius to Fahrenheit (F-905.0 C + 32), replacing the original Celsius temperature with the Fahrenheit value for each element. Note: You do not need to create a new array for this function, just change the values in the original array

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

12 The oxidation state of iodine in IO3 is 0-5 -3 O 0 O +3 O +5 2

Answered: 1 week ago

Question

What advice would you provide to Jennifer?

Answered: 1 week ago

Question

What are the issues of concern for each of the affected parties?

Answered: 1 week ago