C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 2, Problem 6PP
a.
Program Plan Intro
- The variable Fof type float is declared and initialized with value 4 to store force in N.
- The variable k of type float is declared and initialized with value 1000 given.
- The variable l of type float is declared and initialized after converting 3 meters to mm to store the length of rectangular slab.
- The variable w of type float is declared and initialized after converting 4 cm to mm to store the width of rectangular slab.
- The variable d of type float is declared and initialized to value 2 to store the width of rectangular slab.
- The variable e of type float is declared to accept metal's modulus of elasticity.
- The variable I of type float is declared to calculate and store the increase in length using the given formula.
Program description:
The main purpose of the program is to calculate the increase in length when a slab of aluminum that’s 3 meters long, 4 cm wide, and 2 mm deep is subjected to a force of 4 Newton. Aluminum’s modulus of elasticity is 68,950 N/mm2.
.Manually verifies the result produced by the program when Aluminum’s modulus of elasticity is 68,950 N/mm2.
b.
Program Plan Intro
To check the given program for the test value of copper modulus of elasticity of 110000N/mm2.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
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.
6.
(0) Given y' = x - v. v(O) = 1. find correct to four decimal places the value of
%3D
60) y(0.1), by using Euler's method.
09.......
Chapter 2 Solutions
C++ for Engineers and Scientists
Ch. 2.1 - (Practice) State whether the following are valid...Ch. 2.1 - Prob. 2ECh. 2.1 - Prob. 3ECh. 2.1 - (Practice) Determine names for functions that do...Ch. 2.1 - (Program) a. Using cout, write a C++ program that...Ch. 2.1 - (Program) a. Write a C++ program to display the...Ch. 2.1 - (Program) a. How many cout statements would you...Ch. 2.1 - (Program) a. Assuming your compiler isn’t case...Ch. 2.1 - (Practice) You’re given the task of wiring and...Ch. 2.1 - (Practice) You’re given the job of preparing a...
Ch. 2.1 - (Practice) You’re a sophomore in college and are...Ch. 2.1 - (Practice) You’re given the job of planting a...Ch. 2.1 - (Practice) You’re responsible for planning and...Ch. 2.1 - (Data processing) a. A national medical testing...Ch. 2.2 - (Debug) a. Will the following program work?...Ch. 2.2 - (Modify) Rewrite the following programs to conform...Ch. 2.2 - (For thought) a. When used in a message, the...Ch. 2.2 - (For thought) a. A token of a computer language is...Ch. 2.3 - (Practice) Determine data types appropriate for...Ch. 2.3 - (Practice) Compile and run Program 2.5.Ch. 2.3 - Prob. 3ECh. 2.3 - (Practice) Show how the name KINGSLEY is stored in...Ch. 2.3 - Prob. 5ECh. 2.3 - Prob. 6ECh. 2.3 - Prob. 7ECh. 2.3 - (For thought) Although you have concentrated on...Ch. 2.3 - (Practice) Although the total number of bytes...Ch. 2.4 - (Practice) For the following correct algebraic...Ch. 2.4 - (Practice) Determine the values of the following...Ch. 2.4 - (Practice) Determine the value of the following...Ch. 2.4 - (Practice) Evaluate the following mixed-mode...Ch. 2.4 - Prob. 5ECh. 2.4 - Prob. 6ECh. 2.4 - Prob. 7ECh. 2.4 - Prob. 8ECh. 2.4 - Prob. 9ECh. 2.4 - (Program) Write a C++ program that displays the...Ch. 2.4 - Prob. 11ECh. 2.5 - (Practice) State whether the following variable...Ch. 2.5 - Prob. 2ECh. 2.5 - (Practice) a. Write a declaration statement to...Ch. 2.5 - Prob. 4ECh. 2.5 - Prob. 5ECh. 2.5 - Prob. 6ECh. 2.5 - Prob. 7ECh. 2.5 - Prob. 8ECh. 2.5 - (Practice) a. Using Figure 2.14 and assuming the...Ch. 2.5 - Prob. 10ECh. 2.5 - Prob. 11ECh. 2.6 - (Modify) a. Modify Program 2.11 to calculate the...Ch. 2.6 - (Modify) a. Modify Program 2.11 to determine the...Ch. 2.6 - Prob. 3ECh. 2.6 - Prob. 4ECh. 2.6 - (Conversion) a. Design, write, compile, and run a...Ch. 2.6 - (Hydraulics) a. Write, compile, and run a C++...Ch. 2.6 - (Thermodynamics) a. Design, write, compile, and...Ch. 2.6 - Prob. 8ECh. 2 - (General math) a. Design, write, compile, and run...Ch. 2 - (General math) a. Design, write, compile, and run...Ch. 2 - (Physics) a. Design, write, compile, and run a C++...Ch. 2 - Prob. 4PPCh. 2 - (Hydraulics) a. Design, write, compile, and run a...Ch. 2 - Prob. 6PPCh. 2 - (Physics) a. The weight of an object on Earth is a...Ch. 2 - (Modify) a. Modify the program you wrote for...Ch. 2 - (Civil eng.) The maximum load that can be placed...Ch. 2 - (Civil eng.) Modify the program written for...Ch. 2 - (Mechanical eng.) The minimum radius required for...
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
- (b) Write down a Boolean formula for the function f, given the following truth table. [You may use any reasonable notation, but you must be consistent.] a b с f(a,b,c) 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1arrow_forward(c) Using Boolean Algebra Simplify the following function: F = [AB(C + BD) + AB]Carrow_forward(Homework's) Q1/ Two shafts which are 300 mm apart are to be connected by spur gearing. The driving shaft rotates at 1400 rpm and the driven is to be rotate at an approximate speed of 400 rpm If the moduke pitch of the gears is 8 mm, determine the number of teeth on the gears and the actual speed of the driven shaft. Assume that the gears available are of teeth rising in steps of 3 and the smallest gear dose not has teeth kess than 15. Q2/ Find the pitch diameter, diametral pitch and module of a toothed gear having 36 teeth and circular pitch of 13 mm. Q3/ Two wheels of 18 and 45 teeth respective ly are geared together. Determine the pitch circke radius of the two wheeks, if the circular pitch is 50 cm. Q4/ In a compound train of gears spur gear 1, with 40 teeth and rotating at 15 rpm, drives a pinion 6 with 15 teeth at 300 rpm across two intermediate spindles. The first intermediate has gears 2 and 3 and the second carries gears 4 and 5. Gear 2 gearing with gear 1 while 3 gearing with…arrow_forward
- (c) A third expression is due to Wallis (1656): ㅠ 2 2 4 4 6 6 ² = ( ² × ²3 ) × ( ² × ¦ ) × ( ÷ × ;) 2 1 3 5 5 7 X... X 2i 2i X 2i 1 2i + 1 :) X... Write a function pi_wallis (n) which takes an integer n as input and returns an approximation of by evaluating the Wallis formlua with n brackets in the formula. (For example, pi_wallis (3) should return 2.9257142857....)arrow_forward[STRENGTH OF MATERIALS (10.9)] Please provide a solution to the problem. The answer is already given just provide a solution. Thank you! ANSWER: bending is limiting, and gives an allowable superimposed load of 45 kN/m; required welds 0.26 cm throat thickness.arrow_forwardM D d T M. P- A circular shaft having diameters D and d and a groove of radius r (with M = 0 and P O) is made of steel with the allowable shear stress tall. Find the maximum torque I that can be transmitted by the shaft. Given: D = 28mm, d = 20mm, r = 4mm, and tall = 250 MPa. Please help with this question. The answer should be 157.1 Nmarrow_forward
- (numerical analysis matlab) 3) It is requested to solve the X₁, X2,X3 unknowns in the given equation system by using Gauss-Jordan method. Find the result by writing a program. X1 X2 + x3 = 0 X2 + x3 = 0 3x12x2 + 3x3 = 0 -X1 X3 = 0 -arrow_forward1. A 500-liter tank initially contains 10 g of salt dissolved in 200 liters of water. Starting at to = 0, water that contains 1/4 g of salt per liter is poured into the tank at the rate of 4 liters/min and the mixture is drained from the tank at the rate of 2 liters/min. Determine the quantity Q(t) of salt in the tank at time t = 0 until the time when the tank overflows. Code a C program which determined this quantity Q(t) by using RK4 method with h = 1. Note: May use the concept of function prototypes, function definition, function call, recursion etc. in a program. 2. A team of surveyors conducted depth-sounding at equidistant locations across the river to measure the area of a river cross-section. Determine the area of the cross-section by coding a C program of the Composite Simpson Rule, taking into consideration the river's 6.0 m width and the fact that it is equally divided into 7 stations. Station Depth, m 0 1 -1.23 24555 3 6 7 -2.08 -2.57 -1.86 -0.65 -0.24 Note: Determine the…arrow_forwardDont understand how to do c, d, e using matlabarrow_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(c) Compute the errors for both Euler expressions, as in part 1, again for n=1 to 500. Plot a graph showing the errors for both Euler expressions, together with the errors for the previous three approximations from part 1, on the same graph. Comment briefly on the convergence of the Euler methods.arrow_forward---BOOLEAN FORMULAS TO CIRCUITS--- The following question requires you to draw circuit diagrams. Draw these out, for each of these problems, translate the given formula directly, without any simplifcation. 6.) Write `A + (B + CD)` as a circuit.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