Question: Objectives: To use library functions to evaluate equations. To understand nested loop structures, both for and while . Problem 1 : 1 . Add a
Objectives: To use library functions to evaluate equations. To understand nested loop structures,
both for and while
Problem:
Add a line that prompts the user to enter the diameter of a sphere.
Read in and store the number into a variable called diameter you will need to declare any
variables that you use
The diameter is twice as long as the radius, so calculate and store the radius in an appropriately
named variable.
The formula for the volume of a sphere is: V
Convert the formula to C code and add a line which calculates and stores the value of volume in an
appropriately named variable. Use powxy to cube the radius.
Print your results to the screen with an appropriate message.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
