Skip to content
Home » C Program to Find Area of a Circle

C Program to Find Area of a Circle

Learn about C Program to Find Area of a Circle in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.

C Program to Find Area of a Circle

In geometry, the area contained by a circle of radius r is denoted by the symbol πr2. The Greek letter π represents the constant ratio of a circle’s circumference to its diameter, which is approximately equal to 3.14.

Program:

#include<stdio.h>
int main()
{
     // declaring variables
     float radius, area;

     // inputs from user
     printf("Enter Radius of Circle(in cm): ");
     scanf("%f", &radius);

     // calculating area
     area = 3.14 * radius * radius;

     // print result
     printf("Area of Circle = %.2f cm\n", radius,area);

     return 0;
}

Output:

Enter Radius of Circle(in cm): 10
Area of Circle = 314.00 cm

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Codes :
C program to find the distance between two given points
C Program to Calculate Compound Interest