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:
- Create Directory or Folder with C/C++ Program
- C Program to Swap two Numbers
- C Program for Bubble Sort on Linked List
- C program to invert (making negative) an image content in PGM format
- C Program for Selection Sort
- C Program for Bubble Sort
- C Program for Insertion Sort
- C Program for Radix Sort
- C/C++ Program for n-th Fibonacci number
- C Program for Counting Sort
- C Program for Binary Search (Recursive and Iterative)
- C Program for Min Cost Path
- C/C++ Program for Longest Increasing Subsequence
- C Program for Pancake sorting
- C Program for Binary Insertion Sort



