This is a simple program to find a volume of a cube.
Program code :
#include <stdio.h>
int main(void)
{
int length, width, hight;
printf("\n Please Enter Your Length: ");
scanf("%d", &length);
printf("\n Please Enter Your Width: ");
scanf("%d", &width);
printf("\n Please Enter Your Hight: ");
scanf("%d", &hight);
printf("\n Your Volume is: %d \n", length * width * hight );
return 0;
}
Output |
[N.B: We know that volume of a cube "V = A^3" or "V = A x A x A" , just do here in C code.]