Shell script to display the area of the triangle
echo -n “Enter base of a triangel: ”
read b
echo -n “Enter height of a triangle: ”
read h
#area=$(echo “scale=2;(1/2)* $b *$h”|bc)
area=$(echo “scale=2;(1/2) * $b *$h”|bc)
echo “Area of triangle is $area”
Category: Shell Scripting

