[Solved] How would I set up function to calculate the area of a circle – C


#include <stdio.h>

void area_circum(double radius);

int main() {

   double radius;

   printf("Please enter the radius of the circle: ");

   scanf("%lf", &radius);

   area_circum(radius);

   return 0;

}


void area_circum(double radius) {

   double PIE = 3.141;

   double areaC = 0;

   areaC = PIE * radius * radius;

   printf("Area of circle : %0.4f\n", areaC);

}

5

solved How would I set up function to calculate the area of a circle – C