Question: CCODE Write a program to calculate surface area and volume of a sphere (ball). The program will ask user to input radius (meter(s)) of a

CCODE

Write a program to calculate surface area and volume of a sphere (ball). The program will ask user to input radius (meter(s)) of a sphere and return its area and volume (output should round to three decimal places). Use macro #define for value of (suppose = 3.1415927). Learn to use pow function for evaluating square and cubic in math.h of C programming library (Google pow c programming). You can use scanf function and double type for radius input.

Example input and output: (bold are what the program should print on the screen to instruct the user, the italic texts are what the user types in or results output.) Please input a radius (meter(s)) for a sphere: 11.32 Surface area (square meter(s)): 1610.285, Volume (m^3): 6076.142

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!