Javatpoint Logo
Javatpoint Logo

Program to calculate Volume of Cone

Before writing the program of calculating the volume of cone in different programming languages, firstly we have to know about what is cone and what is the formula to find volume of it?

What is Cone?

A cone is a 3-D geometric shape. This shape consist the base of circle shape and the curved surface pointing towards top.

Volume of Cone is the total space acquired by the cone.

Program of calculating the volume of a cone in different Programming languages

Program 1: Write a Program in C language:

Output of Above C program:

Enter the radius of the cone: 5
Enter the height of the cone: 10
Volume of the cone is: 261.666656

Program 2: Write a Program in Java language:

Output of Above Java program:

The Volume of a cone in Java:
261.7994

Program 3: Write a Program in PHP programming language.

Output of Above PHP program:

1046.6666666667

Program 4: Write a Program in Python programming language.

Output of Above Python program:

261.79938779914943





Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA