bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / tuition-c / APC-PRAC-002.c

APC-PRAC-002.c (337B)


      1 /* WAP to calculate area of a circle using math library
      2 method. Take radius of the circle as input. */
      3 
      4 #include <stdio.h>
      5 #include <math.h>
      6 int main()
      7 {
      8     double r, area;
      9     printf("Enter the radius of the circle : ");
     10     scanf("%lf", &r);
     11     area = M_PI * pow(r, 2);
     12     printf("\nArea of the circle : %g", area);
     13     return 0;
     14 }