Skip to content
Related Articles

Related Articles

C Program for Program to find area of a circle

View Discussion
Improve Article
Save Article
  • Last Updated : 31 Mar, 2021

Area of a circle can simply be evaluated using following formula. 

Area = pi * r2
where r is radius of circle  

C




#include <math.h>
#include <stdio.h>
#define PI 3.142
 
double findArea(int r)
{
    return PI * pow(r, 2);
}
 
int main()
{
    printf("Area is %f", findArea(5));
    return 0;
}

Output: 

Area is 78.550000

 

Time Complexity: O(1)

Auxiliary Space: O(1)

Please refer complete article on Program to find area of a circle for more details!
 

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!