Program to calculate area and volume of a Tetrahedron | C ++ code to find the volume of a tetrahedron ; Function to calculate volume ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; double vol_tetra ( int side ) { double volume = ( pow ( side , 3 ) / ( 6 * sqrt ( 2 ) ) ) ; return volume ; } int main ( ) { int side = 3 ; double vol = vol_tetra ( side ) ; vol = ( double ) round ( vol * 100 ) / 100 ; cout << vol ; return 0 ; }