In this example, we will find the C Program to Find Area and Circumference of circle when radius is given.
Area of Circle :- Area of any circle is the region enclosed by the circle itself or the space covered by the circle.
Circumference of a circle :- Circumference of the circle or perimeter of the circle is the measurement of the boundary of the circle.
Formulae :-
Circumference of Circle – 2ℼr
Area of Circle – ℼr2 (where r is the radius of circle) and ℼ = 3.14
EXAMPLE :-
Input
4.5
Output
Area = 63.605
Circumference = 28.268
C Program to find area and circumference of circle
/*C program to find the area and circumference of a circle*/
#include <stdio.h>
#define PI 3.141
int main()
{
float radius,area, circum;
printf("Enter the Radius of circle: ");
scanf("%f", &radius);
area = PI*radius*radius;
circum = 2*PI*radius;
printf("\n");
printf("Area = %f \n", area);
printf("circumference = %f \n", circum);
return 0;
}
Output :-
Enter the Radius of circle: 4.5 Area = 63.605251 Circumference = 28.268999
