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 0.0 10.0 32.0 50.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!

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.3: Nested If Statements
Problem 7E
icon
Related questions
Question

This is the code I have so far. it gives me an error that says

"main.cpp: In function ‘int main()’: main.cpp:11:13: error: expression cannot be used as a function tc1=5(tf1-32)/9;"

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << "Welcome to the Temperature Tool of Layla!\n" << endl << endl;
double tf1, tf2, tf3, tf4, tf5, tf6, tf7;
double tc1, tc2, tc3, tc4, tc5, tc6, tc7;
cout << "Please enter 7 temperatures in Fahrenheit: " ;
cin >> tf1 >> tf2 >> tf3 >> tf4 >> tf5 >> tf6 >> tf7 ;
tc1=5(tf1-32)/9;
tc2=5(tf2-32)/9;
tc3=5(tf3-32)/9;
tc4=5(tf4-32)/9;
tc5=5(tf5-32)/9;
tc6=5(tf6-32)/9;
tc7=5*(tf7-32)/9;
cout <<"degree F" <<setw(35) << "degree C" <<endl;
cout <<fixed<< setprecision(1)<<tf1 <<setw(35)<<fixed << setprecision(1)<< tc1 <<endl;
cout <<fixed<< setprecision(1)<<tf2 <<setw(35)<<fixed << setprecision(1)<< tc2 <<endl;
cout <<fixed<< setprecision(1)<<tf3 <<setw(35)<<fixed << setprecision(1)<< tc3 <<endl;
cout <<fixed<< setprecision(1)<<tf4 <<setw(35)<<fixed << setprecision(1)<< tc4 <<endl;
cout <<fixed<< setprecision(1)<<tf5 <<setw(35)<<fixed << setprecision(1)<< tc5 <<endl;
cout <<fixed<< setprecision(1)<<tf6 <<setw(35)<<fixed << setprecision(1)<< tc6 <<endl;
cout <<fixed<< setprecision(1)<<tf7 <<setw(35)<<fixed << setprecision(1)<< tc7 <<endl;
cout << endl << "Thank you for using the Temperature Tool of Layla!\n" << endl;
int quit;
cout << "To really quit this game, please enter a number: " << endl;
cin >> quit;
return 0;
}

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
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
ADT and Class
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage