Write a c program to find volume and surface area of a cube










#include<stdio.h>
int main(){
    float side;
    float volume,surfaceArea;
    printf("Enter the side of cube : ");
    scanf("%f",&side);
    volume = side * side * side;
    printf("Volume of cube is %f \n", volume);
    surfaceArea = 6 * side * side;
    printf("Surface area of cube is %f ",surfaceArea);
    return 0;
}





Alogrithm:
**




No comments: