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 6.4, Problem 1E

(Practice) The volume, v, and side surface area, s, of a cylinder are given by these formulas:

v = π r 2 l s = 2 π r l

r is the cylinder’s radius, and l is its length. Using these formulas, write and test a function named cylinder() that accepts a cylinder’s radius and length and returns its volume and side surface area.

Blurred answer
Students have asked these similar questions
(For a and b) Equation: a. f(x) = [()*+10]. 12 (3)], for x = 21,2,.. 2 b. x Use the inverse transform method to generate variates from the given equation. With the given equation, derive mathematically and numerically the mean and variance. PROVIDE CODE COMMENTS OR FURTHER EXPLANATION IF NECESSARY.
Question 1 : (Solve quadratic equations) The two roots of a quadratic equation ax? + bx + c = 0 can be obtained using the following formula : -b + V² – 4ac -b – Vb – 4ac and n = 2a 2a b² - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation has two real roots. If it is zero, the equation has one root. If it is negative, the equation has no real roots. Write a program Equation.java for solving a quadratic equation that prompts the user to enter values for a, b, and c and displays the result based on the discriminant. If the discriminant is positive, display two roots. If the discriminant is 0, display one root. Otherwise, display "The equation has no real roots". Note that you can use Math.pow(x, 0.5) to compute the discriminant. Here are some sample runs. Enter a, b, c: 1.0 3 1 -Enter The equation has two roots -0.381966 and -2.61803 Enter a, b, c: 1 2.0 1 -Enter The equation has one root -1 Enter a, b, c: 1 2 3 -Enter The equation has no real…
(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…
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