Program to find volume and surface area of pentagonal prism | function for surface area ; function for VOlume ; Driver function
function surfaceArea ( a , b , h ) { return 5 * a * b + 5 * b * h ; } function volume ( b , h ) { return ( 5 * b * h ) / 2 ; } let a = 5 ; let b = 3 ; let h = 7 ; document . write ( " " + surfaceArea ( a , b , h ) + " " ) ; document . write ( " " + volume ( b , h ) ) ;