# circleare.sh
# Program : To calculate the area and circumference of the circle given
the
radius.
# Author : sujith
# Date : 16/03/2015
clear
echo
"Enter the radious of the circle"
read r
area=$(echo
"3.14*$r*$r" | bc )
circum=$(echo
"3.14*2*$r" | bc)
echo
"area of the circle is
" $area
echo
"circumference of the circle is
" $circum
OUTPUT:
[141740@localhost
~]$ sh circlearea.sh
Enter the
radius of the circle
3.5
area of
the circle is 38.46
circumference
of the circle is 21.98
what does this one do?
ReplyDelete| bc
ReplyDeletenice buddy good working
ReplyDeletebc is used command line calculator . It will calculate that string.
ReplyDeleteNot working... Tried in replit
ReplyDelete