Driver Code
public static void main ( String argc [ ] ) { int b = 4 , h = 9 , a = 4 ; System . out . println ( " Volume ▁ of ▁ triangular " + " ▁ base ▁ pyramid ▁ is ▁ " + volumeTriangular ( a , b , h ) ) ; System . out . println ( " Volume ▁ of ▁ square ▁ base " + " ▁ pyramid ▁ is ▁ " + volumeSquare ( b , h ) ) ; System . out . println ( " Volume ▁ of ▁ pentagonal " + " ▁ base ▁ pyramid ▁ is ▁ " + volumePentagonal ( a , b , h ) ) ; System . out . println ( " Volume ▁ of ▁ Hexagonal " + " ▁ base ▁ pyramid ▁ is ▁ " + volumeHexagonal ( a , b , h ) ) ; } }