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"
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Wednesday, January 14, 2009
Program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle
Posted by ars at 6:37 AM
Subscribe to:
Post Comments (Atom)
1 comments:
sir i need all of the unix programs in the 6th computer science 6th sem vtu syllabus for system software and unix lab,plz sir
Post a Comment