Friday, January 29, 2016

AREA OF ISOSCELES TRIANGLE: Solve for the Area of An Isosceles Triangle in PHP

An isosceles triangle is a triangle with two (2) equal sides. To be able to solve for the area of an isosceles triangle, you need to used the following formula:


Formula














A = area of an isosceles triangle
b = base of the triangle
h = height of the triangle

or you can also used the formula A=1/2 * bh
PHP Code
<?php
$base=5;
$height=8;
$area=$base * $height/2;
echo $area;
?>

On the code above, the base is given the value of 5 and 8 for the height of the isosceles triangle.

Output
20

You can also visit other post related to solving for the area of an object. php ellipse area, php square area, php triangle area.

AREA OF ISOSCELES TRIANGLE: Solve for the Area of An Isosceles Triangle in PHP

AREA OF ISOSCELES TRIANGLE: Solve for the Area of An Isosceles Triangle in PHP Rating: 4.5 Diposkan Oleh: Emoblazz

0 comments:

Post a Comment