Program to find volume and surface area of pentagonal prism | C # program to find surface area and volume of the Pentagonal Prism ; function for surface area ; function for VOlume ; Driver Code
using System ; class GFG { static float surfaceArea ( float a , float b , float h ) { return 5 * a * b + 5 * b * h ; } static float volume ( float b , float h ) { return ( 5 * b * h ) / 2 ; } public static void Main ( ) { float a = 5 ; float b = 3 ; float h = 7 ; Console . WriteLine ( " surface ▁ area ▁ = ▁ " + surfaceArea ( a , b , h ) + " , ▁ " ) ; Console . WriteLine ( " volume ▁ = ▁ " + volume ( b , h ) ) ; } }