Program to calculate area and volume of a Tetrahedron | C # code to find the volume of a tetrahedron ; Function to calculate volume ; Driver Code
using System ; class Tetrahedron { static double vol_tetra ( int side ) { double volume = ( Math . Pow ( side , 3 ) / ( 6 * Math . Sqrt ( 2 ) ) ) ; return volume ; } public static void Main ( ) { int side = 3 ; double vol = vol_tetra ( side ) ; vol = ( double ) Math . Round ( vol * 100 ) / 100 ; Console . WriteLine ( vol ) ; } }