Skip to content

C-Program 12

WRITE A PROGRAM to find volume of a cube using side as input from user

#include <stdio.h>
#include <conio.h>
 
int main(){
 float side, volume;
 printf("Enter length of any side of cube\n");
 scanf("%f", &side);
 /* Volume of Cube = side X side X side */
 volume = side*side*side;
 printf("Volume of Cube : %0.4f\n", volume);
  
 getch();
 return 0;
}

Output