In mathematics, a triangular prism is a three-dimensional solid shape with two identical ends connected by equal parallel lines, and have 5 faces, 9 edges, and 6 vertices.
where “b” is the length of the base, “h” is the height of the triangle, “s1, s2, s3” are the respective length of each side of the triangle, and H is the height of the prism (which is also the length of the rectangle).
Given the base, the height of the triangle, height of prism and the length of each side of triangle base and the task is to calculate the surface area of the triangular prism.
Input: b = 3, h = 4, s1 = 3, s2 = 6, s3 = 6, Ht = 8
Output: The area of triangular prism is 132.000000
Input: b = 2, h = 3, s1 = 4, s2 = 5, s3 = 6, Ht = 8
Output: The area of triangular prism is 126.000000
Formula for calculating the surface area:
As stated above, the prism contains two triangles of the area (1/2)*(b)*(h) and three rectangles of the area H*s1, H*s2 and H*s3.
Now after adding all the terms we get the total surface area:
SA = b * h + (s1 + s2 + s3 ) * H
The area of triangular prism is : 132.000000
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.
- Calculate Volume, Curved Surface Area and Total Surface Area Of Cylinder
- Program to find volume and surface area of pentagonal prism
- Program to find Surface Area and Volume of Octagonal Prism
- Surface Area and Volume of Hexagonal Prism
- Program to find the Volume of a Triangular Prism
- Program to calculate Volume and Surface area of Hemisphere
- Calculate Volume and Surface area Of Sphere
- Calculate volume and surface area of a cone
- Calculate volume and surface area of Torus
- 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 for Surface Area of Octahedron
- Program to find the surface area of the square pyramid
- Find the Surface area of a 3D figure
- Python | Percentage increase in the total surface area of the cuboid
- Mathematics | Area of the surface of solid of revolution
- Minimum number of blocks required to form Hollow Rectangular Prism
- Program to calculate area and perimeter of Trapezium
- Program to calculate area and volume of a Tetrahedron
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.