C Program to find area and circumference of circle


Levels of difficulty: / perform operation:

In this program we have to calculate the area and circumference of the circle. We have following 2 formulas for finding circumference and area of circle.

Area of Circle = PI * R * R

and

Circumference of Circle = 2 * PI * R


C Program

#include<stdio.h>
int main() {
	float radius, area;
	printf("\nEnter the radius of Circle : ");
	scanf("%d", &radius);
	area = 3.14 * radius * radius;
	printf("\nArea of Circle : %f", area);
	return (0);
}


Output


Enter radius of a circle : 1
Area of circle : 3.14
Circumference  : 6.28