我正在尝试使用cpowwithr并且我收到一个语法错误,告诉我在r. 阅读文档后,我仍然对我做错了什么感到困惑?
#include <math.h>
#include <complex.h>
float area(double r)
{
r = (1 - r / 1.83) * 1.25;
double complex z = cpow(r, .2); // i get an error here on the letter r saying missing colon (;)
return r;
}
int main()
{
float a,r;
double radius, sum = 0;
char continu[20];
// the body of the loop is executed at least once
do
{
float a,r;
printf("Enter a number: ");
printf("enter radius of the circle: ");
scanf("%lf",&r);
a=profile(r);
printf("CCOC: %f\n",a);
}
while(continu = 'y');
return 0;
}
Run Code Online (Sandbox Code Playgroud)