C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
bartleby

Videos

Textbook Question
Book Icon
Chapter 5.2, Problem 8E

(Numerical analysis) a. The following is an approximate conversion formula for converting Fahrenheit to Celsius temperatures:

C e l s i u s   =   ( F a h r e n h e i t     30 )   /   2

Using this formula, and starting with a Fahrenheit temperature of 0 degrees, write a C++ program that determines when the approximate equivalent Celsius temperature differs from the exact equivalent value by more than 4 degrees. (Hint: Use a while loop that terminates when the difference between approximate and exact Celsius equivalents exceeds 4 degrees.)

b. Using the approximate Celsius conversion formula given in Exercise 8a, write a C++ program that produces a table of Fahrenheit temperatures, exact Celsius equivalent temperatures, approximate Celsius equivalent temperatures, and the difference between the exact and approximate equivalent Celsius values. The table should begin at 0 degrees Fahrenheit, use 2-degree Fahrenheit increments, and terminate when the difference between exact and approximate values is more than 4 degrees.

Blurred answer
Students have asked these similar questions
(C++ OOP) We have a house with 3 rooms.We need the user to enter 1 integer as the window number, 2 doubles as depth and width of the room, 1 double as the useless area, 1 boolean as the door's opening direction (e.g. 0 is outward).Program will compute and print the air condition as a string and the total useful area of the house as a double. Calculating the air condition: Name it air_c. Divide the useful area by the window number. If air_c >20, output "bad". If air_c <11 output "good". If 11<=air_c<=20, output "ideal". Attention: If the window number is 0, air condition is bad. Calculating the useful area of room: Width*Depth-(useless area)if the door is inward;Width*Depth-(useless area)-0.8The worst air condition of the 3 is the final air condition of house. --- 1)The information about the home must be all private within a class.2)The class must get these inputs within constructor func.3)Calculating the useful area of a room must be done within a function of a class.4)Air…
(Apartment problem) A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program in C++ that prompts the user to enter: The total number of units. The rent to occupy all the units. Amount to maintain a rented unit. The increase in rent that results in a vacant unit. The program then outputs: The number of units to be rented to maximize the profit The maximum profit Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2.
1. (Floating-Point Arithmetic). For each of the following numbers,(a) determine whether the number is a 4-digit oating-point number (the number of the FPA4);(b) if yes, write the number in the standard form ±0.d1d2d3d4 × 10n, where d1 is a nonzero digit and n ∈ Z;(c) if no, rst chop and then round the number to a number of the FPA4, written in the standard form:(i) − 0.989067000000001; (ii) − 51.8; (iii) − 900.377050000001; (iv) − 5000.0;(v) − 0.023409; (vi) 2036.0; (vii) 0.01814.

Chapter 5 Solutions

C++ for Engineers and Scientists

Knowledge Booster
Background pattern image
Computer Science
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
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License