Area and circumference of circle

Circumference :-Circumference of circle is the distance around the circle. 

        Calculate The Circumference of Circle By Given Formula

Circumference = 2*Ï€*r    

Here Pi (Ï€) is a Greek Letter and r is a Radius (1/2 Of Diameter )
Pi (Ï€) = 3.141592653589793 Approx. It Is A Constant Value 

Area   =Ï€ *r*r



Answer :-

#include<stdio.h>
int main()
{
   
   int rad;
   float Pi = 3.14, area, ci;

   printf("\nEnter radius of circle: ");
   scanf("%d", &rad);

   area = Pi * rad * rad;
   printf("\nArea of circle : %f ", area);

   ci = 2 * Pi * rad;
   printf("\nCircumference : %f ", ci);

   return (0);
}


Output:-

Post a Comment

0 Comments