## C program to calculate area of circle

In this article, we will illustrate c program to calculate area of circle. The formula for the area of the circle is :

`Area_circle = Π * r * r`

where,

mathematical value of Π is 3.14159.

Please go through following articles of c programming, if you do not already know about these topics :

## simple c program to calculate area of circle

``````#include <stdio.h>

int main() {

printf("Enter the radius of circle : ");

printf("Area of circle : %f", area_circle);

return 0;
}``````

Output

``````Enter the radius of circle : 10.0
Area of circle : 314``````

In this program first, a user is asked to enter the value of the radius of the circle. After that area is calculated and then displayed.

## C program for calculating area of a circle using function

``````#include <stdio.h>

//Function declaration

int main() {

printf("Enter the radius of circle : ");

printf("Area of circle : %.2f", areaOfcircle(radius));
printf("\n");

return 0;
}

// function definition to calculate area of circle
``````Enter the radius of circle : 10.0
This program also calculates and display the area of the circle but only difference is a function name `areaOfcirlce()` is used to calculate area of circle and return it.