Question: Can someone help me with my code? Please write the code using parameters. Sample Output Enter the diameter of a sphere: 2 A sphere with

Can someone help me with my code? Please write the code using parameters.

Can someone help me with my code? Please write the code usingparameters. Sample Output Enter the diameter of a sphere: 2 A sphere

Sample Output Enter the diameter of a sphere: 2 A sphere with diameter = 2 has radius = 1 circumference = 6.28319 surface area = 12.5664 and volume = 4.18879 Hint: If using the math library ensure to add -Im in compile line. This is done for you in the button below. A Spherical Study Write four functions to compute the following properties of a sphere given a diameter, d, which is greater than or equal to 0.0: (a.) radius r = d/2 (b.) surfaceArea = 4 X 1 X p2 (c.) circumference = id (d.) volume = 44 x r3 Write a main program that will input the diameter of a sphere, call all four functions, and print out the four results. Do not accept inputs less than 0.0. Please note parameter for each function: radius( diameter) surfaceArea( radius) circumference( diameter) volume( radius)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!