The tetrahedron is a pyramid with a triangular base, that is, its base is a triangle and each side has a triangle. All three triangles converge to one point. As shown in the figure,
Tetrahedral area = (√3)a2
##ExampleFind the tetrahedral area The code uses the math library to find the square and square root of a number, using the sqrt and pow methods. To calculate the area, we take a floating point number and give the value of the expression "((sqrt(3)*a*a))".#include <stdio.h> #include <math.h> int main() { int a= 5; float area, volume; printf("Program to find area and volume of Tetrahedron</p><p>"); printf("The side of Tetrahedron is %d </p><p>", a); area = (sqrt(3)*(a * a)); printf("The area of Tetrahedron is %f </p><p>", area); return 0; }
Program to find area and volume of Tetrahedron The side of Tetrahedron is 5 The area of Tetrahedron is 43.301270
The above is the detailed content of Program to calculate the area of a tetrahedron. For more information, please follow other related articles on the PHP Chinese website!