APC-PRAC-002.c (473B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* WAP to calculate area of a circle using math library 8 method. Take radius of the circle as input. */ 9 10 #include <stdio.h> 11 #include <math.h> 12 int main() 13 { 14 double r, area; 15 printf("Enter the radius of the circle : "); 16 scanf("%lf", &r); 17 area = M_PI * pow(r, 2); 18 printf("\nArea of the circle : %g", area); 19 return 0; 20 }