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
#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
filter_none
Output:
Area is 78.550000
Please refer complete article on Program to find area of a circle for more details!
Recommended Posts:
- Program to calculate area of a Tetrahedron
- C Program to find whether a no is power of two
- C/C++ Program to find sum of elements in a given array
- C/C++ Program to Find sum of Series with n-th term as n^2 - (n-1)^2
- C Program to find size of a File
- Lex program to find the Length of a String
- C Program to find transpose of a matrix
- C program to find the length of a string
- C Program for Find sum of odd factors of a number
- C Program for Find the perimeter of a cylinder
- C Program to Find minimum sum of factors of number
- C Program to find largest element in an array
- Program to find Prime Numbers Between given Interval
- Lex program to find the length of the longest word
- C program to Find the Largest Number Among Three Numbers



