Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions