answersLogoWhite

0


Best Answer

echo "Enter the Number"

read n

r=`expr $n % 2`

if [ $r -eq 0 ]

then

echo "$n is Even number"

else

echo "$n is Odd number"

fi

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a Shell program to find the area and circumference of a circle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Geometry

What is Circle pi relationship?

Pi ( 3.142 approx.) is the amount of times the diameter of a circle can be measured along the circumference of a circle. We know that Pi multiplied by the diameter of the circle is equal to it circumference. So we write C=PiD This means, as it says above, that a certain number of "Pi's" will be equal to the circumference.


What iS the radius of a circle with circumference?

A circle is a shape with all points the same distance from the center. It is named by the center. The circle to the left is called circle A since the center is at point A. If you measure the distance around a circle and divide it by the distance across the circle through the center, you will always come close to a particular value, depending upon the accuracy of your measurement. This value is approximately 3.14159265358979323846... We use the Greek letter (pronounced Pi) to represent this value. The number goes on forever. However, using computers, has been calculated to over 1 trillion digits past the decimal point.The distance around a circle is called the circumference. The distance across a circle through the center is called the diameter. is the ratio of the circumference of a circle to the diameter. Thus, for any circle, if you divide the circumference by the diameter, you get a value close to . This relationship is expressed in the following formula:where is circumference and is diameter. You can test this formula at home with a round dinner plate. If you measure the circumference and the diameter of the plate and then divide by , your quotient should come close to . Another way to write this formula is: where · means multiply. This second formula is commonly used in problems where the diameter is given and the circumference is not known (see the examples below).The radius of a circle is the distance from the center of a circle to any point on the circle. If you place two radii end-to-end in a circle, you would have the same length as one diameter. Thus, the diameter of a circle is twice as long as the radius. This relationship is expressed in the following formula: , where is the diameter and is the radius.


How do you find the arc length with the angle given?

An arc can be measured either in degree or in unit length. An arc is a portion of the circumference of the circle which is determined by the size of its corresponding central angle. We create a proportion that compares the arc to the whole circle first in degree measure and then in unit length. (measure of central angle/360 degrees) = (arc length/circumference) arc length = (measure of central angle/360 degrees)(circumference) But, maybe the angle that determines the arc in your problem is not a central angle. In such a case, find the arc measure in degree, and then write the proportion to find the arc length.


How do you write an equation for a circle with a center?

Equation of any circle, with any radius, and its center at any point: [ x - (x-coordinate of the center) ]2 + [ y - (y-coordinate of the center) ]2 = (radius of the circle)2


How do you write the equation of a circle?

The general equation for the circle - or one of them - is: (x - a)^2 + (y - b)^2 = r^2 Where: a and b are the coordinates of the center r is the radius

Related questions

Write a shell program to find the area and circumference of the circle?

echo -n "Enter the radius of a circle : "read r# use formula to get itarea=$(echo "scale=2;3.14 * ($r * $r)" | bc)# use formula to get itd=$(echo "scale=2;2 * $r"|bc)circumference=$(echo "scale=2;3.14 * $d"| bc)echo "Area of circle is $area"echo "Circumference of circle is $circumference"# ### softspy88@gmail.com


How do you write a c program to calculate the circumference of the circle using macros with parameters?

// macro definitions: #define PI 3.14159265358979323846 #define CIRCUMFERENCE(radius) (2. * (radius) * PI) // use this as in CIRCUMFERENCE(21.34)


What is Circle pi relationship?

Pi ( 3.142 approx.) is the amount of times the diameter of a circle can be measured along the circumference of a circle. We know that Pi multiplied by the diameter of the circle is equal to it circumference. So we write C=PiD This means, as it says above, that a certain number of "Pi's" will be equal to the circumference.


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


What a relationship between pi and circle?

Pi ( 3.142 approx.) is the amount of times the diameter of a circle can be measured along the circumference of a circle. We know that Pi multiplied by the diameter of the circle is equal to it circumference. So we write C=PiD This means, as it says above, that a certain number of "Pi's" will be equal to the circumference.


Define pi and write a brief history of pi?

pi is the ratio between the radius and the circumference of the circle if the radius is 1 the circumference is pi


Write a program in pascal that calculates the area of a circle?

{Area s the area of cube} {Length is the length of one side of the cube} program AreaofCube; var Area,Length:real; begin write('Enter the length of cube: '); readln(Length); Area:=6*(Length*Length); writeln('The area of cube is ', Area, ' cm^2.'); end.


Is Clw the formula for the circumference of an circle?

To find the circumference of a circle, multiply the diameter by Pi. Pi is written as 3.14 or just use the Pi button on a calculator. You could also write something to the effect of 3pi.


Write a Shell program to find the smallest number from a set of numbers?

k


Write a shell program to check and display 10 leap years?

dono


Write a java code to draw a circle inside in an ellipse?

write a program draw circle and ellipse by using oval methods in java


The diameter of the small wheel was 7 inches. The circumference was about 22 inches. Write the ratio of the circumference to the diameter of the circle as a decimal number rounded to the nearest hundredth?

7.00