求程序的完整
对于X=1,2,....10,求F(X)=X*X-5*x+SIN(X)的最大值
import java.lang.Math.*;
public class JModify2{
public JModify2(){}
public double getMax(double a[]){
double tmp=f(a[0]);
for(int i=1;i<a.length;i++){
_____1_____
if(tmp<tmp1)
tmp=tmp1;
}
return tmp;
}
public double f(double x){
_____2_____
}
public static void main(String args[]){
JModify2 jm1=new JModify2();
double a[]={1,2,3,4,5,6,7,8,9,10};
double max=jm1.getMax(a);
System.out.println("max is:"+max);
}
}