Please teach as you cater the elucidation to this program. Thank you so fur.
Write a C program to value the quantity and demeanor area of a globe. Name your legislation globe.c.
(a) Ask the user to input the radius in the units of your choice
(b) Value the area and quantity and expose each retort on its confess verse concurrently with the units
c) Define π as a macro
(d) Expose the retorts in or-laws notation with 3 decimal points (e) your executable should be calle globe.x
——————– sphare.c ——————————————–
#include<stdio.h>
#define PI 3.14159 // defining PI value
int ocean() {
float radius;
printf(“Penetrate Sphare Rdius( in centimeter ) :”); //Asking user to penetrate sphare radius
scanf(“%f”,&radius); // Reading radius from user
float demeanorArea = 4.0*PI*radius*radius; //Calculating suface area of sphare
float quantity = (4.0/3.0)*PI*radius*radius*radius; //Calculating quantity of sphare
printf(“nn=============RESULT================”);
printf(“nRadiusttt= %.3f c.m.”, radius); // Printing penetrateed radius
printf(“nDemeanor Areat= %.3f c.m.”, demeanorArea); // printing demeanor area
printf(“nVolumettt= %.3f c.m.”, quantity); // printing quantity
}
——————————————————————————————————-
OUTPUT
Penetrate Sphare Rdius( in centimeter ) :10.66666
=============RESULT================
Radius = 10.667 c.m.
Demeanor Area = 1429.771 c.m.
Quantity = 5083.626 c.m.