error C2064: term does not evaluate to a function错误,求救#include#includevoid main(){ double x1=1,x2=1,x3=1,x4=1,t1,t2,t3,t4,p1,p2,p3,p4,p5,p6,p,e,g; t1=2*(x1)+20*(x2)+40*((x1)-(x4))*((x1)-(x4))*((x1)-(x4)); t2=20*(x1)+200*(x2)+4*((x2)-2*(x3))*(

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 09:44:46
errorC2064:termdoesnotevaluatetoafunction错误,求救#include#includevoidmain(){doublex1=1,x2=1,x3=1,x4=1,t

error C2064: term does not evaluate to a function错误,求救#include#includevoid main(){ double x1=1,x2=1,x3=1,x4=1,t1,t2,t3,t4,p1,p2,p3,p4,p5,p6,p,e,g; t1=2*(x1)+20*(x2)+40*((x1)-(x4))*((x1)-(x4))*((x1)-(x4)); t2=20*(x1)+200*(x2)+4*((x2)-2*(x3))*(
error C2064: term does not evaluate to a function错误,求救
#include
#include
void main()
{
double x1=1,x2=1,x3=1,x4=1,t1,t2,t3,t4,p1,p2,p3,p4,p5,p6,p,e,g;
t1=2*(x1)+20*(x2)+40*((x1)-(x4))*((x1)-(x4))*((x1)-(x4));
t2=20*(x1)+200*(x2)+4*((x2)-2*(x3))*((x2)-2*(x3))*((x2)-2*(x3));
t3=10*(x3)-10*(x4)-8*((x2)-2*(x3))*((x2)-2*(x3))*((x2)-2*(x3));
t4=-10*(x3)+10*(x4)-40((x1)-(x4))*((x1)-(x4))*((x1)-(x4));
e=(t1)*(t1)+(t2)*(t2)+(t3)*(t3)+(t4)*(t4);
g=sqrt(e);
while(g>0.01)
{
t1=2*(x1)+20*(x2)+40*((x1)-(x4))*((x1)-(x4))*((x1)-(x4));
t2=20*(x1)+200*(x2)+4*((x2)-2*(x3))*((x2)-2*(x3))*((x2)-2*(x3));
t3=10*(x3)-10*(x4)-8*((x2)-2*(x3))*((x2)-2*(x3))*((x2)-2*(x3));
t4=-10*(x3)+10*(x4)-40((x1)-(x4))*((x1)-(x4))*((x1)-(x4));
p1=e;
p2=(t1)*(120*(x1)*(x1)-240*(x1)*(x4)+2-120*(x4)*(x4))+20*(t2)+(t4)*(-120*(x1)*(x1)+240*(x1)*(x4)+120*(x4)*(x4));
p3=20*(t1)+(t2)*(12*(x2)*(x2)-48*(x2)*(x3)-48*(x3)*(x3)+200)+(t3)*(-24*(x2)*(x2)+96*(x2)*(x3)+96(x3)*(x3));
p4=(t2)*(96*(x3)*(x3)-96*(x2)*(x3)-24*(x2)*(x2))+(t3)*(-192*(x3)*(x3)+192*(x2)*(x3)+48*(x2)*(x2)+10)-10*(t4);
p5=(t1)*(120*(x4)*(x4)-240*(x1)*(x4)-120*(x1)*(x1))-10*(t3)+(t4)*(-120*(x4)*(x4)+240*(x1)*(x4)+120*(x1)*(x1)+10);
p6=(p2)*(t1)+(p3)*(t2)+(p4)*(t3)+(p5)*(t4);
p=(p1)/(p6);
x1=x1-p*(t1);
x2=x2-p*(t2);
x3=x3-p*(t3);
x4=x4-p*(t4);
e=4*(x1)*(x1)+64*(x2)*(x2);
g=sqrt(e);
}
printf("x1=%f,x2=%f\n,x3=%f\n,x4=%f\n",x1,x2,x3,x4);
}
编译后c(9) : error C2064: term does not evaluate to a function
c(17) : error C2064: term does not evaluate to a function
c(20) : error C2064: term does not evaluate to a function
是在找不出问题啊

error C2064: term does not evaluate to a function错误,求救#include#includevoid main(){ double x1=1,x2=1,x3=1,x4=1,t1,t2,t3,t4,p1,p2,p3,p4,p5,p6,p,e,g; t1=2*(x1)+20*(x2)+40*((x1)-(x4))*((x1)-(x4))*((x1)-(x4)); t2=20*(x1)+200*(x2)+4*((x2)-2*(x3))*(
主要是数据项过多,又由于数学习惯,产生问题,缺少符号.前两个是t4中40后面缺少运算符,直接加了括号;后面一个是p3中最后一个96后面缺少运算符.
建议:使变量名有一定的意义,最好不要使用类似x1,x2,x3之类的变量.(纯粹个人看法)