Write a program that converts Celsius to Fahrenheit or vice-versa, to one decimal place. You will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that converts Celsius to Fahrenheit or vice-versa, to one decimal place. You will need to look up the formulas for the conversions. The first value in the input is the temperature (a float), and the second value indicates whether that temperature is Celsius (1) or Fahrenheit (2, or actually anything other than 1). Also output how the temperature feels, as described further below. If the input is 301, the output is: 30.0 C is 86.0 F (warm) If the input is 30 2, the output is: 30 F is -1.1 C (freezing) Use the following table to output how the temperature feels. All temperatures below are CELSIUS. <= 0: freezi <= 10: cold <= 20 mild <= 30: warm > 30: hot LAB ACTIVITY 16.2.1: QZ2: Branches 1 #include <iostream> 2 #include <iomanip> // Needed to set output decimal place precision 3 using namespace std; 4 5 int main() { 6 7 S 9 10) 11 /* Type your code here. */ return 0; Search 7 main.cpp 17 0 1 199 H H L C Load default template... O 0/10 C ( a Write a program that converts Celsius to Fahrenheit or vice-versa, to one decimal place. You will need to look up the formulas for the conversions. The first value in the input is the temperature (a float), and the second value indicates whether that temperature is Celsius (1) or Fahrenheit (2, or actually anything other than 1). Also output how the temperature feels, as described further below. If the input is 301, the output is: 30.0 C is 86.0 F (warm) If the input is 30 2, the output is: 30 F is -1.1 C (freezing) Use the following table to output how the temperature feels. All temperatures below are CELSIUS. <= 0: freezi <= 10: cold <= 20 mild <= 30: warm > 30: hot LAB ACTIVITY 16.2.1: QZ2: Branches 1 #include <iostream> 2 #include <iomanip> // Needed to set output decimal place precision 3 using namespace std; 4 5 int main() { 6 7 S 9 10) 11 /* Type your code here. */ return 0; Search 7 main.cpp 17 0 1 199 H H L C Load default template... O 0/10 C ( a
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Give the worst-case Big O running time of this code and explain in detail how you arrived at this answer, assuming an ArrayList is passed. public static void f1( List 1st) { int i=0; while (i
-
One measure of the computer industry's health is final sales. Final sales mean transactions where the purchaser is the end user who is expected to use the computer. Use FRED, the online economic...
-
31% of American adults surveyed stated that giving up their phone for a day would be more difficult than giving up their significant other. In 2012, the United States population over the age of 18...
-
A 0.1 cm thick flat copper plate, 2.5 m x 2.5 m square is to be cooled in a vertical position. The initial temperature of the plate is 90?C with the ambient fluid at 30?C. The fluid medium is either...
-
Figure P8.71 shows the streamlines and potential lines of flow over a thin-plate weir as computed by the complex potential method. Compare qualitatively with Fig. 10.16a. State the proper boundary...
-
A frustum is made by removing a small square-based pyramid from a similar large squared-based pyramid as shown in the diagram. 15 cm 45 39 cm $13 Work out the total surface area of the frustum. Give...
-
A four-stroke diesel engine sucks during the suction stroke (a) only air (b) mixture of fuel and air (c) only fuel (d) any one of the above
-
A supermarket chain wants to know if their buy one, get one free campaign increases customer traffic enough to justify the cost of the program. For each of 10 stores they select two days at random to...
-
What emerging trends in bioprocessing are reshaping the field, such as single-use technologies, advanced bioreactors, or automation, and how do they influence the future of biomanufacturing ?
-
Two power plants are currently emitting 8,000 tons of pollution each (for a total of 16,000 tons) in City A. Marginal pollution reduction costs for Plant 1 are given by MCR 1 = 0.02 Q 1 and for Plant...
-
Don and Phil worked as sales reps for a national baking company (company). Last month, they failed to meet their quotas and were reprimanded by their supervisors. The night of the reprimand, at home,...
-
How has remote work changed over the past few years? Is it better or worse than working in the office? What are its advantages and disadvantages? Please provide references.
-
Franklin on vacation for several weeks. While Franklin was away his neighbour, Samantha, decided to weed and maintain his large vegetable and flower gardens, as well as cut the grass in his large...
-
Analyse the impact of COVID-19 on mortgage serviceability (i.e., the ability of mortgage borrowers to meet scheduled mortgage payments from income). Explain two reasons why mortgage serviceability...
-
In addition to giving away money at the time of their death, individuals are allowed to give gifts of money during their lifetime. In 2022, they were allowed to give up to $16,000 per year to as many...
-
In the U.S., mortgage interest payments are tax deductible. That is, a mortgage borrower can pay less income tax if she also pays a mortgage. Question: consider the mortgage lending market. How does...
-
On January 1, 2024, Spectrum Pharma sells the machine for 4,000 cash. Prepare the journal entries to record the sale of the machine under the two different depreciation methods.
-
Use a calculator to evaluate the expression. Round your result to the nearest thousandth. V (32 + #)
-
For a list of numbers entered by the user and terminated by 0. Write a program to find the sum of the positive numbers and the sum of the negative numbers.
-
Given the following array, write a program to sort the array using a selection sort and display the number of scores that are less than 500 and those greater than 500. Scores [0] 198 Scores [1] = 486...
-
Create an instance of the class, Rectangle and reference it with the name MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End...
-
How is financial accounting different from management accounting?
-
As the new controller, reply to the following comment made by your plant manager: When I employ a proper accounting software, which can process all my daily accounting records and provide me with all...
-
Describe the five-step decision-making process.
Study smarter with the SolutionInn App