PJ 4 – Temperature Table Please write a C++ program that will get 7 temperatures in Fahrenheit from the user, convert them to 7 temperatures in Celsius respectively, and then print a table of 7 temperatures from Fahrenheit to Celsius. All the temperatures in the output must show only one decimal digit after the decimal point. The temperature conversion formulas are as follows: 9. T =;(T;- 32) and T;=T+32 %3D

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

#include <iostream>// include library to access input output stream: cin cout
#include <iomanip> // include library to access output manipulators: setw(35) setprecision(2)using namespace std; // Access cout, endl, cin using standard namespace without using std::

int main() // integer function main() should return integer to the caller.
{
cout << "Welcome to the Temperature Tool of Layla !\n" << endl << endl;
double tf1, tf2, tf3, tf4, tf5, tf6, tf7; // temperature F, 7 of them, don’t use float
double tc1, tc2, tc3, tc4, tc5, tc6, tc7; // temperature C, 7 of them, don’t use float
cout << "Please enter 7 temperatures in Fahrenheit: " ; // prompt input from the user
cin >> tf1 >> tf2 >> tf3 >> tf4 >> tf5 >> tf6 >> tf7 ; // get 7 input values

//// need help here to convert all 7 F-temperatures// to C-temperatures, and then print a table for them. ////

cout << endl << "Thank you for using the Temperature Tool of Layla!\n" << endl;
int quit; // declare integer variable quit // You must use your name here
cout << "To really quit this game, please enter a number: " << endl;
cin >> quit; // get the input from user // so you have time to do screenprint
return 0; // return zero to indicate a successful completion of main functio
} // end main ( ) function // end of C++ program =============================.

PJ 4 – Temperature Table
Please write a C++ program that will get 7 temperatures in Fahrenheit from the user, convert them to 7
temperatures in Celsius respectively, and then print a table of 7 temperatures from Fahrenheit to Celsius.
All the temperatures in the output must show only one decimal digit after the decimal point.
The temperature conversion formulas are as follows:
5
9.
T. =;(Tf-32) and
Tf = T+32
Transcribed Image Text:PJ 4 – Temperature Table Please write a C++ program that will get 7 temperatures in Fahrenheit from the user, convert them to 7 temperatures in Celsius respectively, and then print a table of 7 temperatures from Fahrenheit to Celsius. All the temperatures in the output must show only one decimal digit after the decimal point. The temperature conversion formulas are as follows: 5 9. T. =;(Tf-32) and Tf = T+32
The input of your test case #1 must be: 32 50 68 77 95 100 212.
The output of your test case #1 must look exactly as follows including the data.
You must also do test case #2 and test case #3 with different input data of your choices.
Each test case or test run must begin with a welcome message, and must end with a thank-you message.
Welcome to the Temperature Tool of Dr. Simon Lin!
E You must use your name!
Please enter 7 temperatures in Fahrenheit: 32 50 68 77 95 100 212
degree F degree C
32.0
0.0
50.0
10.0
68.0
20.0
77.0
25.0
95.0
35.0
100.0
37.8
212.0
100.0
Thank you for using the Temperature Tool of Dr. Simon Lin! + You must use your name!
Transcribed Image Text:The input of your test case #1 must be: 32 50 68 77 95 100 212. The output of your test case #1 must look exactly as follows including the data. You must also do test case #2 and test case #3 with different input data of your choices. Each test case or test run must begin with a welcome message, and must end with a thank-you message. Welcome to the Temperature Tool of Dr. Simon Lin! E You must use your name! Please enter 7 temperatures in Fahrenheit: 32 50 68 77 95 100 212 degree F degree C 32.0 0.0 50.0 10.0 68.0 20.0 77.0 25.0 95.0 35.0 100.0 37.8 212.0 100.0 Thank you for using the Temperature Tool of Dr. Simon Lin! + You must use your name!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education