# program to find the volume of cone

program to find the volume of cone on fibonacci, factorial, prime, armstrong, swap, reverse, search, sort, stack, queue, array, linkedlist, tree, graph etc.

## Program to find the volume of the cone

The cone can be defined as the three dimensional object with a circular base. The volume of the cone is measured in cubic units. Be sure that all of the measurements are in the same unit before computing the volume.

### Formula

```volume of cone= pie x r2 x h/3
```

### Algorithm

1. Define the height of the cone.
2. Define the radius of the cone.
3. Calculate the volume of the cone pie x r2 x h/3
4. Define volume_cone and assign the volume of the cone to it.

O(1)

### C Program

```C Program:
#include
int main()
{
int height=38;
double pie=3.14285714286;
printf("Volume of the cone=%f",volume);
}
```

Output:

```Volume of the cone=48766.666667
```

### PHP Program

```<?php
\$height=38;
\$pie=3.14285714286;
echo "Volume of the cone=";
echo \$volume;
?>
```

Output:

```The volume of the cone=48766.666666711
```

### Java Program

```public class cone{
public static void main(String args[])
{
int height=38;
double pie=3.14285714286;
System.out.println("Volume of the cone="+volume);
}
}
```

Output:

```Volume of the cone=48766.666666711004
```

### C# Program

```using System;
public class Program
{
public static void Main()
{
int height=38;
double pie=3.14285714286;
Console.WriteLine("Volume of cone="+volume);
}
}
```

Output:

```Volume of cone=48766.666666711
```

### Python Program

```height=38
pie=3.14285714286
print("volume of the cone="+str(volume))
```

Output:

```Volume of cone=48766.666666711
```

Next Topic#