/*
* 1000+ C programs + tutorials
*
*
* 9_calculate_volume_of_cube.c
*
*
* Created on: Oct 20, 2014
* Author: Code2care.org
*/
#include <stdio.h>
//#include <conio.h>
void main() {
int side;
long volume_of_cube;
// clrscr();
printf(" Program to calculate Volume of a Cube : \n\n");
printf(" Enter the side of cube : ");
scanf("%d", &side);
volume_of_cube = side*side*side;
printf("\n\n Volume of Cube with Side as %d = %ld ",side, volume_of_cube);
// getch();
}
- Output :
Program to calculate Volume of a Cube :
Enter the side of cube : 40
Volume of Cube with Side as 40 = 64000
Program to calculate Volume of a Cube :
Enter the side of cube : 10
Volume of Cube with Side as 10 = 1000
The best way to learn C programming is to practice more and more of programs .
Code2care C Programming tutorials provide 1000+ programs in C that you can study and become an expert in the language. Programs are divided into categories depending upon type and complexity.
BSc. IT, BSc. Computer Science, BSc. IT, MSc. IT, MSc. Computer Science, MCA, BTech IT & BTech Engineers may find these programs very useful.