Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following description applies to program assignments 1, 2 and 3 below. You are asked to develop applications by using a C++ programming language to

The following description applies to program assignments 1, 2 and 3 below.

You are asked to develop applications by using a C++ programming language to process a series of temperature readings for a scientist. The input data are 12 temperatures (float values), and the outputs are each temperature as well as the difference between the current temperature and the one preceding it (the difference is not output for the first temperature). Each temperature and its difference from the preceding one is outputted in one line. At the end of the program, the average temperature should also be outputted. Be sure to use proper formatting and appropriate comments in your code.

For example, given the input data 34.5 38.6 42.4 46.8 51.3 63.1 60.2 55.9 60.3 56.7 50.3 42.1 The output should be: 34.5 38.6 4.1 42.4 3.8 46.8 4.4 51.3 4.5 63.1 11.8 60.2 -2.9 55.9 -4.3 60.3 4.4 56.7 -3.6 50.3 -6.4 42.1 -8.2 Average: 50.2

Programming assignment #1: Develop the above application so that the 12 temperatures are read from the keyboard, and the outputs are displayed on the screen. (keyboard computing screen) (Lab4-Q1)

Programming assignment #2: Make a copy of the program #1 and modify it so that the 12 temperatures are read from input, myInputT.txt, and the outputs are displayed on the screen. (inputFile computing screen) (Lab4-Q2)

Programming assignment #3: Make a copy of the program #2 and modify it so that the 12 temperatures are read from input, myInputT.txt, and the outputs are stored in an output file, myOutputT.txt. (inputFile computing outputFile) (Lab4-Q3)

Computer Science

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

Why should a root CA remain offline?

Answered: 1 week ago