Question: Write a program that prompts the user for the radius and height of a cylinder and outputs its surface area and volume. A function named
Write a program that prompts the user for the radius and height of a cylinder and outputs its surface area and volume. A function named cylinderStats is required. You may use the following formulas for computation. surfacearea = 2 pi * (radius)^2 + height * (2 pi * radius) volume = pi * (radius)^2 * height Write a program that defines the following function. void cylinderStats(double r, double h) Sample Output: Enter the radius and height: 4.0 5.0 Surface Area: 226.19 Volume: 251.33
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
