Find volume of cube : C Program

Find volume of a cube : C Program
This program is to find volume of a cube which is based on C Program. This project is basics of C.

This C Program computes the volume of a cube. The formula used to find the volume of the cube is volume = h * l * b.

Here is source code of the C program to compute the volume of a cube. The C program is successfully compiled and run on a Linux system. The program output is also shown below.

[message_box title=”Program ” color=”red”]

/* Write a program to find volume of a cube */

/* Written by Utpal Chaudhary */

/*Studen of L.D COLEGE OF ENGINEERING,Navrangpura,Ahmedabad-15 */

#include <stdio.h>
#include <conio.h>

void main()

int h,l,b,v;          /* I take h, l, b, v integer but if you want to take that float,long integer,long float,double etc. Then take it */
clrscr ();

printf (“Enter height:”);
scanf (“%d”,&h);

printf(“Enter lenght:”);
scanf (“%d”,  &l);

printf(“Enter breadth:”);
scanf (“%d” , &b);
v = l * h * b ;
printf (“Volume of cube:%d”,v);
getch ();



[message_box title=”Output” color=”red”]
Enter height: 4

Enter lenght: 4

Enter breadth: 4

Volume of cube:64


Previous articleFind Area of Rectangle
Next articleIC 7490

Leave a Reply

Be the First to Comment!

Notify of