## shell scripting for area of square,rectangle,circle

In our childhood many of us used to hate mathematics where we need to calculate the areas of the different shapes.There we need to remember the formulas of each and every shape.Today we shall write the program to find area of square,rectangle,circle so that we can use them in future. We use the childhood formulas for calculation of area of above mentioned geometrical figures.

1. For square side * side
2. For rectangle lenght * breadth

The code is:

echo “Enter the side of the square:”
echo “Enter the length and breadth of rectangle:”
echo “Enter the radius of the circle:”
echo “Area of the square is:` expr \$s \* \$s ` ”
echo “Area of the rectangle is: `expr \$leng \* \$brea`”
echo “Area of the circle is: `expr 3.14 \* radius \* radius`”

output:
Enter the side of the square:5
Enter the length and breadth of rectangle: 10 6
Enter the radius of the circle:8
Area of the square is:25
Area of the rectangle is:60
Area of the circle is:200.96 