C Program for Program to find area of a circle

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

Area = pi * r2
where r is radius of circle 
filter_none

edit
close

play_arrow

link
brightness_4
code

#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;
}

chevron_right


Output:

Area is 78.550000

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



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.