Program to compute volume and surface area of a cube.

 #include <stdio.h>

  #include <math.h>


 int main()

 {

    float side,volume,surface;

    printf("enter the value of side");

    scanf("%f",&side);

    volume=pow(side,3);

    printf("the volume of cube is %.2f\n",volume);

    surface=pow(side,2)*6;

    printf("the surface area of cube is %.2f",surface);

    return 0;

 }

No comments:

Post a Comment

Programming in C Language

  PROGRAM LIST TO BECOME PRO IN C    😍😍😍            PRACTICE SETS                                                        UNIT -1  👇   IN...