Hi there! The following tutorial will introduce you to one of the most common problems encountered in programming subjects. Later on, I will provide set of activities and quizzes for you to practice on to improve your programming skills.

Area solver for shapes is just one of the exercises given by most programming instructors. Some other exercises are the following:

An

**equilateral triangle**is a triangle with three (3) equal sides. The following is the illustration and formula on how to solve for the area of the equilateral triangle.

I also have several PHP and Java codes here related to solving for the

**area of a square**,

**area of circle**,

**area of a triangle**,

**area of rectangle**and

**area of an ellipse**.

**Formula area of ****equilateral triangle**

**A = Area of the equilateral triangle**

**a = one side of the triangle**

**PHP Code area of ****equilateral triangle**

<?php

$a=7;

$area=sqrt(3)/4*pow($a,2);

echo "The area of the equilateral triangle with the side of $a is ".number_format($area,3);?>

**Output area of ****equilateral triangle**

## No comments:

## Post a Comment