************************************************** **
Here is the question:
Write a program that prints, in main(), the double-precision area of a circle given that a user's double-precision radius is passed to the function. The formula for calculating a circle's area is
area = 3.14159 * (radius * radius)
************************************************** **
Here is the code:
// prints the double precision of the area of the circle
// where formula is area = 3.14159 * (radius * radius)
// value is passed to a function
#include<stdio.h>
double radius(double radius); // global variables
main ()
{
double area;
double radius;
radius(radius);
area = 3.14159 * (radius * radius);
printf("The double precision area of your circle is %f", area);
return 0;
}
double radius(double radius)
{
printf("What is the radius of your circle:");
scanf(" %.5f", &radius);
return (radius);
}
************************************************** **
I get an error message saying that the text in bold is not a function. What am i doing wrong here?
error C2063: 'radius' : not a function