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
Chat with our AI personalities
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.
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.
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.
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
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