In this article, you will learn how to calculate the Area of a Circle using the C Programming Language. The program will prompt the user for the Radius and print out the area of the circle.

How to calculate the Area of a Circle?

The circle’s area is determined by its Radius R. The formula to calculate the area is:

Area of a circle = \pi x R^{2}

Where Pi is a constant of value 3.14.

C Program to Calculate the Area of Circle

#include <stdio.h>
int main() {
float radious, area;
const float pi = 3.14;
printf("Please enter the radius of circle: ");
scanf("%f", & radious);
area = pi * radious * radious;
printf("The area of the circle is: %.2f", area);
return 0;
}

Output

Please enter the radius of circle: 5
The area of the circle is: 78.50