hi,
u make a 2 column table for i and j and for each variable's latest value u go on updating the column values... thats the only way.. and dont try to do it in ur mind itself.. when there is a long loop...
and the answers ofcourse... the latest values of column values (in most of the cases) :-D
Regards,
Nandish