Question: how to do loop in loop

Hello every one,

I am facing problem with for loop. Please have a look.


let say I have T[0]:= 99 ; X[0]:=0; f(x):=108 + 2 x

  for i from 1 to 2 do f(x[i-1] ):

                              y[i]:=x[i-1] +1 ;

if f(y[i])<f(x[i-1]) then x[i]:=y[i] elif 0.98< e0.99/T[0]  then x[i]:=y[i] else x[i]:=x [i-1]

end if;

end do;

after I got the answer from this loop, now I want to continue the loop for T[1]:= 0.1 T[0], 

 how  to do another loop by using the same  information but in different value of T? in other words, the only change in the looping is the value T so that the next loop I have the set of answer.




Please Wait...