C Program Code To Find 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 for more about Circumference Click Here


Area =π *r*r


C Language Program

#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.


 

Comments