Given the base length(b) and slant height(s) of the square pyramid. The task is to find the surface area of the Square Pyramid. A Pyramid with a square base, 4 triangular faces, and an apex is a square pyramid.
In this figure,
b – base length of the square pyramid.
s – slant height of the square pyramid.
h – height of the square pyramid.
Input: b = 3, s = 4 Output: 33 Input: b = 4, s = 5 Output: 56
Formula for calculating the surface are of the square pyramid with (b) base length and (s) slant height.
Below is the implementation using the above formula:
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 find Surface Area and Volume of Octagonal Prism
- Program to find volume and surface area of pentagonal prism
- Calculate Volume, Curved Surface Area and Total Surface Area Of Cylinder
- Program to find the area of a Square
- Program for Surface area of Dodecahedron
- Program for Surface Area of Octahedron
- Program for Volume and Surface Area of Cube
- Program for Volume and Surface Area of Cuboid
- Program for Volume and Surface area of Frustum of Cone
- Program to calculate Volume and Surface area of Hemisphere
- Program to calculate the Surface Area of a Triangular Prism
- Find the Surface area of a 3D figure
- Program for Area Of Square
- Program for Area Of Square after N-th fold
- Program to calculate area of an Circle inscribed in a Square
- Find number of square of area Z which can be built in a matrix having blocked regions
- Find the area of the shaded region formed by the intersection of four semicircles in a square
- Find side of Square which makes minimal area to fit two identical rectangles inside it
- Calculate volume and surface area of Torus
- Mathematics | Area of the surface of solid of revolution
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.