A shell-script to read the radius from the user and calculate the area of the circle.

echo -e “Enter the radius::\c”

read r

pi=3.14

area=expr $pi\*$r\*$r | bc

echo “Area of the circle:”$area

 

OUTPUT::

 

Enter the radius::5

Area of the circle:78.50

 

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.