# SS3
# Calculates the area and circumference of circle and rectangle
# Usage: SS3
echo Enter length, breadth and radius
read length breadth radius
areaR=‘expr $length \* $breadth‘
perimeterR=‘expr $length \* 2+ $breadth \* 2 ‘
areaC=‘echo 3.14 \* $radius \* $radius | bc ‘
cirC=‘echo 2 \* 3.14 \* $radius | bc‘
echo Area of rectangle = $areaR and perimeter = $perimeterR
echo Area of circle = $areaC and circumference = $cirC
No comments:
Post a Comment