表达式不能用作函数 (POW)
Expression cannot be used as a function (POW)
double aluminumWireResistance(double length, double wiregauge)
{
const long double PI=(atan(1)*4);
int a;
double diam2;
double numerator2=((4(2.82*pow(10,-8)))*length);
double denominator2= (PI*pow(diam2,2));
a=((36-wiregauge)/39);
diam2=(.127*pow(92,a));
diam2=(diam2/100);
double alumWireResistance=numerator2/denominator2;
return alumWireResistance;
}
我收到错误:表达式不能用作双分子 2 行上的函数它应该是 4*(2.82*10^-8)*length
你是这样说的:
double numerator2=((4(2.82*pow(10,-8)))*length);
想必你是这个意思:
double numerator2=((4 * (2.82*pow(10,-8)))*length);
// ^
double aluminumWireResistance(double length, double wiregauge)
{
const long double PI=(atan(1)*4);
int a;
double diam2;
double numerator2=((4(2.82*pow(10,-8)))*length);
double denominator2= (PI*pow(diam2,2));
a=((36-wiregauge)/39);
diam2=(.127*pow(92,a));
diam2=(diam2/100);
double alumWireResistance=numerator2/denominator2;
return alumWireResistance;
}
我收到错误:表达式不能用作双分子 2 行上的函数它应该是 4*(2.82*10^-8)*length
你是这样说的:
double numerator2=((4(2.82*pow(10,-8)))*length);
想必你是这个意思:
double numerator2=((4 * (2.82*pow(10,-8)))*length);
// ^