(Physics) Buoyancy is the upward force a liquid exerts on a submerged object, as shown in Figure 6.9. The buoyancy force is given by this formula:
a. Using this formula, write a function named buoyantForce(double ro, double vol, int units) that accepts a fluid density, the volume of an object placed in the fluid, and the units to be
b. Include the function written for Exercise 6a in a working C++
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
C++ for Engineers and Scientists
- (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(Oceanography) The pressure, P, exerted on an underwater object can be determined by this formula: P=gh is the density of water, which is 1.94slug/ft3 . g is the acceleration caused by Earth’s gravity, which is 32.2ft/sec2. h is the object’s depth in the water in feet. a. Determine the units of P by calculating the units resulting from the right side of the formula. Check that your answer corresponds to the units for pressure listed in Table 1.1. b. Determine the pressure on a submarine operating at a depth of 2500 feet.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
- 13.sol Matlab The electrical circuit shown consists of resistors and voltage sources. Determine the current in each resistor, using the mesh current method that is based on Kirchhoff's second voltage law. V =38 V, V = 20V, V, = 24V R, =15Ω R, = 182 R, = 10Ω R, =9Ω R, = 5Ω R, = 14Ω R, = 82 R, = 132arrow_forward(Practice) Determine the values of the following integer expressions: a.3+46f.202/( 6+3)b.34/6+6g.( 202)/6+3c.23/128/4h.( 202)/( 6+3)d.10( 1+73)i.5020e.202/6+3j.( 10+3)4arrow_forward(Automotive) a. An automobile engine’s performance can be determined by monitoring its rotations per minute (rpm). Determine the conversion factors that can be used to convert rpm to frequency in hertz (Hz), given that 1rotation=1cycle,1minute=60seconds,and1Hz=1cycle/sec. b. Using the conversion factors you determined in Exercise 7a, convert 2000 rpm into hertz.arrow_forward
- A thermometer reading 50°C is taken outside where the temperature is30°C. Five minute later the reading is 40°C. Find the temperature reading 10minutes later after the thermometer was brought outside.arrow_forward1. Supposed a ball is thrown straight up in the air with an initial velocity of 50 feet per second and an initial height of 5 feet. How high will the ball be after 3 seconds? Note: The height after t seconds is given by the expression - 16t+vot+ho, where ve is the initial velocity and he is the initial height.arrow_forward1-Using Sage, create an elliptic curve with parameters a = 21 and b =10 and modulo 337 2- What is the order of the curve? 3- print the first 10 points in the curve 4- Plot all the point on the elliptic curvearrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr