systax error on taken "=" ,Expression expected after this token
jsp的一个文件中 报错<%!
double c1;
double k1;
double c2;
double k2;
double MM;
double TDEV;
%>
<% String type=request.getParameter("type");
double num=Double.parseDouble(request.getParameter("num"));
if(type.equals("you")){
c1=2.4;
k1=1.05;
c2=2.5;
k2=0.38;
}
if(type.equals("ban")){
c1=3.0;
k1=1.12;
c2=2.5;
k2=0.35;
}
if(type.equals("qian")){
c1=3.6;
k1=1.20;
c2=2.5;
k2=0.32;
}
MM=c1*Math.pow(num,k1);
TDEV=c2*Math.pow(MM,k2);
if(2<num<8){
MM=[68+(num-2)*(65-68)/(8-2)]/100*MM; //此处和下面的每个等号都有报错,报错信息为systax error on taken "=" ,Expression expected after this token
TDEV=[63+(num-2)*(59-63)/(8-2)]/100*TDEV;
}
if(8<num<32){
MM=[65+(num-8)*(62-65)/(32-8)]/100*MM;
TDEV=[59+(num-8)*(55-59)/(32-8)]/100*TDEV;
}
if(32<num<128){
MM=[62+(num-32)*(59-62)/(128-32)]/100*MM;
TDEV=[55+(num-32)*(51-55)/(128-32)]/100*TDEV;
}
%>