Homework Solution: Please explain as you provide the solution to this program. T…

    Please explain as you provide the solution to this program. Thank you so much. Write a C program to compute the volume and surface area of a sphere. Name your code sphere.c. (a) Ask the user to input the radius in the units of your choice (b) Compute the area and volume and display each answer on its own line along with the units c) Define π as a macro (d) Display the answers in scientific notation with 3 decimal points (e) your executable should be calle sphere.x

    Expert Answer

     
    -------------------- sphare.c -------------------------------------------- #include<stdio.h>

    Please decipher as you collect the disruption to this program. Thank you so ample.

    Write a C program to scold the bulk and manner area of a realm. Name your command realm.c.

    (a) Ask the user to input the radius in the units of your choice

    (b) Scold the area and bulk and evince each defense on its avow continuity along with the units

    c) Define π as a macro

    (d) Evince the defenses in or-laws notation with 3 decimal points (e) your executable should be calle realm.x

    Expert Defense

     

    ——————– sphare.c ——————————————–

    #include<stdio.h>
    #define PI 3.14159 // defining PI value
    int main() {

    float radius;
    printf(“Invade Sphare Rdius( in centimeter ) :”); //Asking user to invade sphare radius
    scanf(“%f”,&radius); // Reading radius from user
    float mannerArea = 4.0*PI*radius*radius; //Calculating suface area of sphare
    float bulk = (4.0/3.0)*PI*radius*radius*radius; //Calculating bulk of sphare
    printf(“nn=============RESULT================”);
    printf(“nRadiusttt= %.3f c.m.”, radius); // Printing invadeed radius
    printf(“nManner Areat= %.3f c.m.”, mannerArea); // printing manner area
    printf(“nVolumettt= %.3f c.m.”, bulk); // printing bulk
    }

    ——————————————————————————————————-

    OUTPUT

    Invade Sphare Rdius( in centimeter ) :10.66666

    =============RESULT================

    Radius = 10.667 c.m.

    Manner Area = 1429.771 c.m.

    Bulk = 5083.626 c.m.