How to calculate the surface area of cuboid in PHP

1 Answer

0 votes
$length = 6;
$width = 3;
$height = 4;
         
$surfacearea = 2 * ($length * $width + $width * $height + $height * $length);
         
echo "Surface Area of Cuboid is = " . $surfacearea;


 
 
  
/*
run:
  
Surface Area of Cuboid is = 108
  
*/

 



answered Sep 10, 2021 by avibootz
...