i'm tying 2 describe my problem here.plz solve it for me..

1. generate a random number b2in 0 and 1 (r);

2. do t=r*2.5 ;

3. do w= t/100

4. keep track of all t1,t2,t3.... in an array and do the sum S=(t1+t2+t3......) ;

5. repeat steps 1,2,3,4, till S<100

6. store the corresponding w1,w2,w3... in another array/ heap

7. sort them in ascending order.