Question: looping problem

hey all

I want to write an algorithm similar to this but instead of ''w1:=a+h''   I have to put about 75 commands. how can i do this?

 

restart;

w:= 4:

w1_lst:=NULL:
for k from 1 to 10 do

  for h from 1 to 20 do

    for a from 4 to 15 do

      w1:= a + h: 

      w1_lst:=w1_lst,w1:

       if  w1< w then w:=w1:

       else w:= w:

       end if:

    end do:

  end do:

end do;

w1_lst;

Please Wait...