Program for Volume and Surface Area of Cuboid | utility function ; Driver Code
< ? php function areaCuboid ( $ l , $ h , $ w ) { return ( $ l * $ h * $ w ) ; } function surfaceAreaCuboid ( $ l , $ h , $ w ) { return ( 2 * $ l * $ w + 2 * $ w * $ h + 2 * $ l * $ h ) ; } $ l = 1 ; $ h = 5 ; $ w = 7 ; echo " Area ▁ = ▁ " , areaCuboid ( $ l , $ h , $ w ) , " STRNEWLINE " ; echo " Total ▁ Surface ▁ Area ▁ = ▁ " , surfaceAreaCuboid ( $ l , $ h , $ w ) ; ? >