C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Question
Chapter 5.2, Problem 9E
(a)
Program Plan Intro
- P, g, p , Q, and H variables are used in the program.
- int main(), fixed, and setprecision () functions are used in the program.
Program Description: The main purpose of the program is to determine the watts of power generated by the water flow using the given formula. The formula to calculate thepower generated by the water flow is:
P = p * Q * H * g;
(b)
Program Plan Intro
Program Plan:
- P, g, p , Q, and H variables are used in the program.
- int main(), fixed, and setprecision () functions are used in the program.
Program Description: The main purpose of the program is to use the program written in the program 9E (a) to determine the watts of power generated by the water flow using the given formula for the distance of head for 10 to 28 meters with the increment of 2-meter. The formula to calculate the power generated by the water flow is:
P = p * Q * H * g;
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Simplify the following expressions according to the commutative law:
a. A⋅B + B⋅A + C⋅D⋅E + C⋅D⋅E + E⋅C⋅D
b. A⋅B+A⋅C+B⋅A
c. (L⋅M⋅N) (A⋅B) (C⋅D⋅E) (M⋅N⋅L)
d. F⋅(K + R) + S⋅V + W⋅X + V⋅S + X⋅W + (R + K)⋅F
(xiii) Determine all the permutations of the numbers less than or equal to
some given number n.
For example, if n = 123, then the permutations are:
123
321
231
132
213
312
(xiv) Find a series of five consecutive numbers, the sum of the squares of the
first three of which is equal to the sum of the squares of the last two.
For example,
(– 2)2+ (– 1)2+ 02= 12+ 22
(xv) Limit the checking within 1000, to show all the triad numbers within
10,000. A number is said to be a triad number if the double and triple
of the number contain all separate digits with no repetition of any one
of them.
(xvi) Identify and show the integer values of x, y, and z that satisfy the
equation: Z²= X²+ y²
EXAMPLE: The sum of any two even integers is even.
Answer:
Proof. (direct) Suppose x and y are even integers. By definition of even, let x = 2k and y = 2j for some
integers j and k. Then,
x+y=2k+2j = 2(k + j)
Note that k+j is an integer because it is the sum of integers. Therefore, by definition of even, x + y is
even.
Chapter 5 Solutions
C++ for Engineers and Scientists
Ch. 5.1 - (For review) List the three repetition statements...Ch. 5.1 - Prob. 2ECh. 5.1 - (For review) a. What’s the difference between a...Ch. 5.2 - (Practice) Rewrite Program 5.1 to print the...Ch. 5.2 - (Practice) Rewrite Program 5.4 to produce a table...Ch. 5.2 - (Conversion) Write a C++ program that converts...Ch. 5.2 - (Practice) An automobile travels at an average...Ch. 5.2 - (Numerical analysis) a. The following is an...Ch. 5.2 - Prob. 9ECh. 5.3 - Prob. 1E
Ch. 5.3 - (Conversion) a. Write a C++ program to convert...Ch. 5.3 - (Misc. application) a. The data in the following...Ch. 5.4 - (Practice) Write a for statement for each of the...Ch. 5.4 - (Desk check) Determine the value in total after...Ch. 5.4 - Prob. 5ECh. 5.4 - (Conversion) Write a C++ program to convert...Ch. 5.5 - (cin within a loop) Write and run a C++ program...Ch. 5.5 - Prob. 4ECh. 5.5 - Prob. 5ECh. 5.5 - Prob. 7ECh. 5.5 - (Program) Write a program that tests the...Ch. 5.5 - Prob. 14ECh. 5.5 - (Program) Write a program to simulate the rolling...Ch. 5.6 - (Misc. application) Four experiments are...Ch. 5.6 - (Electrical eng.) a. An electrical manufacturer...Ch. 5.6 - (Mathematical functions) Write a program that...Ch. 5.6 - Prob. 6ECh. 5.7 - (Practice) a. Using a do statement, write a...Ch. 5.7 - (Misc. application) a. Write a program that...Ch. 5.7 - (Misc. application) a. Write a program to reverse...Ch. 5.7 - Numerical analysis) Given a number, n, and an...Ch. 5.7 - (Numerical analysis) Here’s a challenging problem...Ch. 5 - (Probability) The probability that a phone call...Ch. 5 - (Mechanics) The deflection at any point along the...Ch. 5 - (Physics) A golf ball is dropped from an airplane....
Knowledge Booster
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
- (Mechanics) The deflection at any point along the centerline of a cantilevered beam, such as the one used for a balcony (see Figure 5.15), when a load is distributed evenly along the beam is given by this formula: d=wx224EI(x2+6l24lx) d is the deflection at location x (ft). xisthedistancefromthesecuredend( ft).wistheweightplacedattheendofthebeam( lbs/ft).listhebeamlength( ft). Eisthemodulesofelasticity( lbs/f t 2 ).Iisthesecondmomentofinertia( f t 4 ). For the beam shown in Figure 5.15, the second moment of inertia is determined as follows: l=bh312 b is the beam’s base. h is the beam’s height. Using these formulas, write, compile, and run a C++ program that determines and displays a table of the deflection for a cantilevered pine beam at half-foot increments along its length, using the following data: w=200lbs/ftl=3ftE=187.2106lb/ft2b=.2fth=.3ftarrow_forward(Statics) An annulus is a cylindrical rod with a hollow center, as shown in Figure 6.7. Its second moment of inertia is given by this formula: I4(r24r14) I is the second moment of inertia (m4). r2 is the outer radius (m). r1 is the inner radius (m). a. Using this formula, write a function called annulusMoment ( ) that accepts two double-precision numbers as parameters (one for the outer radius and one for the inner radius), calculates the corresponding second moment of inertia, and displays the result. b. Include the function written in Exercise 5a in a working program. Make sure your function is called from main(). Test the function by passing various data to it.arrow_forward(Thermodynamics) The work, W, performed by a single piston in an engine can be determined by this formula: W=Fd F is the force provided by the piston in Newtons. d is the distance the piston moves in meters. a. Determine the units of W by calculating the units resulting from the right side of the formula. Check that your answer corresponds to the units for work listed in Table 1.1. b. Determine the work performed by a piston that provides a force of 1000 N over a distance of 15 centimeters.arrow_forward
- P5. ( Boolean Algebra Circuit. (1) Transform the following Boolean equation in SOP form to POS form: Y = F(A, B, C, D) = ĀB + CD (2) Expand the following Boolean equation into a sum of minterms, where each minterm should have the three input variables in their original or complement forms. Y = F(A, B, C) = AC + AB (3) Simplify the following Boolean equations using Boolean theorems. For each step in the minimization process, show which theorem or axiom or method or definition is used to get there. Y = ABC + B + AC + B (4) Transform the following Boolean equation to an equation that only has 2-input NAND gate(s) and/or NOT gate(s). You are not required to draw a schematic. Y = A + B + Carrow_forward(32° +2a?) (23 +3x) Indicate the least integer n for which E O(2"). gd +14arrow_forwardH.W:- Used Cramer's Rule to find the value of the variables in the following equations: -x + 3y = 9 -(1) 2x + 7y = -3 (2)arrow_forward
- Nonearrow_forwardIn matlab code Find the velocity of mars, earth, venus. In the descent phase of an extraterrestrial space mission, a spacecraft free falls through the planet's atmosphere. As it falls, it will reach a constant or terminal velocity when the air resistance force balances the gravitational attraction force. The terminal velocity is given by V₁ = where m is the spacecraft's mass [m], g is the acceleration due to gravity on the planet, p is the atmosphere's density [kg/m³], Cp is the spacecraft's drag coefficient, and A is the spacecraft's cross-sectional area [m²]. a) Write a function named terminalVelocity which calculates the terminal velocity an object. The function should . 2mg pCDA input m, g, p, CD, and A output the terminal velocity b) Write a program named q03.m which calculates the terminal velocity of a spacecraft at 10 km above the surface of various planets. The spacecraft's properties are m = 240 [kg], A= 15 [m²], and Cp = 0.5. The program should use the gravity and terminal…arrow_forwardInstructions: Solve for the domain of the given functions. n(x) = cos(3x + 1)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
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