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:
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- 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 Octahedron
- Program for Surface area of Dodecahedron
- 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