Javatpoint Logo
Javatpoint Logo

Write a program to find the Volume of Octahedron

Before writing the program of calculating the volume of an octahedron in different programming languages, firstly we have to know about an octahedron and its formula.

What is Octahedron?

Octahedron is a regular polyhedron shape, which has six vertices, twelve edges, and eight faces.

Volume of Octahedron

Program of calculating the volume of an octahedron in different Programming languages

Program 1: Write a Program in C language:

Output of Above C program:

Enter the side of the octahedron:5
Surface area of the octahedron is: 58.925564

Program 2: Write a Program in Java language:

Output of Above Java program:

The volume of a octahedron is:
814587.0119269028

Program 3: Write a Program in PHP programming language.

Output of Above PHP program:

471.40452079103

Program 4: Write a Program in Python programming language.

Output of Above Python program:

471404.5207910317





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