Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions