A pyramid is a 3-dimensional geometric shape formed by connecting all the corners of a polygon to a central apex.
There are many types of pyramids. Most often, they are named after the type of base they have. Let’s look at some common types of pyramids below.
Volume of a square pyramid [base of Pyramid is square] = (1/3) * (b^2) * h
Volume of a triangular pyramid [base of Pyramid is triangle] = (1/6) * a * b * h
Volume of a pentagonal pyramid [base of Pyramid is pentagonal] = (5/6) * a * b * h
Volume of a hexagonal pyramid [base of Pyramid is hexagonal] = a * b * h
Below is code for calculating volume of Pyramids :
Volume of triangular base pyramid is 23.9904 Volume of square base pyramid is 47.52 Volume of pentagonal base pyramid is 119.52 Volume of Hexagonal base pyramid is 144
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Program to print pyramid pattern
- Program to print hollow pyramid and diamond pattern
- C Program to print pyramid pattern
- Program to print a inverse pyramid character pattern
- Program to find the surface area of the square pyramid
- Programs for printing pyramid patterns in Python
- Programs for printing pyramid patterns in C++
- Programs for printing pyramid patterns in Java
- Print the following pyramid pattern
- PHP programs for printing pyramid patterns
- Programs for printing pyramid patterns using recursion
- Program for Volume and Surface Area of Cube
- Program for Volume and Surface Area of Cuboid
- Program to calculate volume of Ellipsoid
- Program to calculate area and volume of a Tetrahedron
- Program to calculate Volume and Surface area of Hemisphere
- Program for Volume and Surface area of Frustum of Cone
- Program to calculate volume of Octahedron
- Program to find the Area and Volume of Icosahedron
- Program to find the Volume of a Triangular Prism
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : vt_m