Surface Area and Volume of Hexagonal Prism | C ++ program to find the Surface Area and Volume of Hexagonal Prism . ; Function to calculate Surface area ; Formula to calculate surface area ; Display surface area ; Function to calculate Volume ; formula to calculate Volume ; Display Volume ; Driver Code ; surface area function call ; volume function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; void findSurfaceArea ( float a , float h ) { float Area ; Area = 6 * a * h + 3 * sqrt ( 3 ) * a * a ; cout << " Surface ▁ Area : ▁ " << Area ; cout << " STRNEWLINE " ; } void findVolume ( float a , float h ) { float Volume ; Volume = 3 * sqrt ( 3 ) * a * a * h / 2 ; cout << " Volume : ▁ " << Volume ; } int main ( ) { float a = 5 , h = 10 ; findSurfaceArea ( a , h ) ; findVolume ( a , h ) ; return 0 ; }