Program to find the Volume of a Triangular Prism | Java program to find the volume of the triangular prism ; function to find the Volume of triangular prism ; formula to find Volume ; Driver code ; function calling
import java . io . * ; class GFG { static float findVolume ( float l , float b , float h ) { float volume = ( l * b * h ) / 2 ; return volume ; } public static void main ( String [ ] args ) { float l = 18 , b = 12 , h = 9 ; System . out . println ( " Volume ▁ of ▁ triangular ▁ prism : ▁ " + findVolume ( l , b , h ) ) ; } }