The length and breadth of a rectangle and radius of circle are input through the keyboard. Write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle.
echo "Enter the length of the rectangle : "
read l
echo "Enter the breadth of the rectangle : "
read b
ar=`expr $l \* $b`
echo "Area of rectangle is $ar"
p=`expr 2 \* ( $l + $b)`
echo "Perimeter of the rectangle is $p"
echo "Enter the radius of the circle "
read r
arc=`echo 3.14 \* $r \* $r |bc`
echo "Area of the circle is $arc"
echo "Enter the length of the rectangle : "
read l
echo "Enter the breadth of the rectangle : "
read b
ar=`expr $l \* $b`
echo "Area of rectangle is $ar"
p=`expr 2 \* ( $l + $b)`
echo "Perimeter of the rectangle is $p"
echo "Enter the radius of the circle "
read r
arc=`echo 3.14 \* $r \* $r |bc`
echo "Area of the circle is $arc"