public class ReadFile{
public static void main(String args[]){
double min = 99999999;
for(int i = 1; i < 10; i++){
double tem = Math.sin(i) + i * i - i * 5; //Math.sin(i)一定要放在前面,否则出错
min = tem < min ? tem : min;
}
System.out.println("最小值为: " + min);
}
}
x := 1;
k := 0.0;
while x<11 do begin
if k > f(x) then k=f(x);
end;
什么语言?matlab?