Program to calculate volume of Octahedron | CPP Program to calculate volume of Octahedron ; utility Function ; Driver Function
#include <bits/stdc++.h> NEW_LINE using namespace std ; double vol_of_octahedron ( double side ) { return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) ) ; } int main ( ) { double side = 3 ; cout << " Volume ▁ of ▁ octahedron ▁ = " << vol_of_octahedron ( side ) << endl ; }