C Program to Find Area of a Circle

The area of a circle is the space occupied by the circle in a two-dimensional plane.

To find the area of circle, we need radius or diameter of circle.

Formula of Area of Circle is π×r2

Program


#include <stdio.h>

int main() {
       float radius, area;
       printf("Enter radius of circle : ");
       scanf("%f", &radius);
       area = 3.14 * radius * radius;
       printf("The area of the circle is %f", area);
       return 0;
    }

Output


Enter radius of circle : 5
The area of the circle is 78.500000

Post a Comment

0 Comments