Program to find Surface Area and Volume of Octagonal Prism | Function to find the Volume of octagonal prism ; Formula to calculate volume = ( area * h ) ; Display volume ; Function to find the surface area of octagonal prism ; Formula to calculate Surface area ; Driver Code
function find_volume ( area , h ) { let Volume = ( area * h ) ; document . write ( " " + Volume + " " ) ; } function find_Surface_area ( area , a , h ) { let Surface_area = ( 2 * area ) + ( 8 * a * h ) ; document . write ( " " + Surface_area + " " ) ; } let h = 1 ; let a = 6 ; let d = 2 ; let area = 2 * a * d ; find_Surface_area ( area , a , h ) ; find_volume ( area , h ) ;