求教一个小问题,本人就是不知道哪错了
#include<stdio.h>#include<math.h>
#define PI 3.1415926
void hardness()
{
double R,h,d1,d2,m,p1,p2,g;
R=1.59;
g=9.8;
scanf("%lf,%lf,%lf",&h,&d1,&m);
d2=2*sqrt(R*R-(R-h)*(R-h));
p1=(0.102*2*m*g)/(PI*R(R-sqrt(R*R-d1*d1)));
p2=(0.102*2*m*g)/(PI*R(R-sqrt(R*R-d2*d2)));
printf("%lf,%lf\n",p1,p2);
}
int main(void)
{
while(2>1)
hardness();
return 0;
}
编译时说p1,p2那两行有问题:term does not evaluate to a function