```
Variables:
1. height : (Datatype int) : to represent the height of Cone.
2. radius : (Datatype int) : to represent the radius of Cone.
3. PI : (Datatype float) : static variable to represent constant PI value upto 3 decimal places i.e 3.142
5. volume_of_cone : (Datatype float) : to store volume of Cone calculated.
```

Formula :**Volume of a Cone : π x r2x h**

```
/*
* 1000+ C programs + tutorials
*
*
* 12_calculate_volume_of_cone.c
*
*
* Created on: Oct 20, 2014
* Author: Code2care.org
*/
#include <stdio.h>
//#include <conio.h>
void main() {
int height;
int radius;
float volume_of_cone;
float PI = 3.142;
// clrscr();
printf(" Program to calculate Volume of a Cone : ");
printf("\n\n Enter the Radius of Cone : ");
scanf("%d", &radius);
printf("\n\n Enter the Height of Cone : ");
scanf("%d", &height);
volume_of_cone = PI*radius*radius*height;
printf("\n\n Volume of Cone with Radius as %d and Height as %d = %f",radius,height,volume_of_cone);
// getch();
}
```

```
Output :
Program to calculate Volume of a Cone :
Enter the Radius of Cone: 2
Enter the Height of Cone: 5
The volume of Cone with Radius as 2 and Height as 5 = 62.840000
```

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.

**More Posts related to C-program,**

- Calculate Volume of Cylinder
- Calculate Volume of Sphere
- Calculate Volume of Cube
- Calculate Volume of Ellipsoid
- Find Sum of two numbers
- Division between two numbers
- Calculate Area of Trapezoid
- Calculate Area of a Rectangle
- Calculate Volume of Pyramid
- Calculate Area of ellipse
- Find Difference of two numbers
- Calculate Volume of Cone
- Calculate Area of Square
- Calculate Area and Circumference of Circle
- Calculate Area of Parallelogram

**More Posts:**

- Android : Connection with adb was interrupted 0 attempts have been made to reconnect - Android
- INVALID FILE NAME: MUST CONTAIN ONLY [a-z0-9_.] Android Eclipse Error - Eclipse
- Failed to find provider info for com.facebook.katana.provider.PlatformProvider - Android
- Align html element at the center of page vertically and horizontally - Html
- Android Disable EditText from Auto Focus on Activity load - Android
- How to Convert CSV file to SQL Script using Notepad++ - NotepadPlusPlus
- How to create StackOverflow error in java - Java
- Location of eclipse.ini file on Mac OS X - Mac-OS-X
- List of jar files for Jax-ws (SOAP) based Java Web Services - Java
- JSON Schema Validator Libraries: JSON Tutorial - Json-Tutorial
- List of Java versions - Java
- Static IP MTNL available at Rs. 200 per month - HowTos
- SharePoint Server 2016 IT Preview - new improved Features and Enhancements - SharePoint
- How to export bookmarks from Google Chrome Browser - Chrome
- Fetch as Google Crawl Error or Redirected Status - Google