Knuth Shuffle on the TI-85:
:ClLCD :Disp "KNUTH SHUFFLE" :Disp "How many items?" :Prompt N : :seq(x,x,1,N,1)→S :For(I,1,N) :round(rand*(dimL S)+.4999,0)→D :S(D)→TEMP :S(I)→S(D) :TEMP→S(I) :End : :Disp S
Ta-dah.
你是互联网,我是防火墙
Knuth Shuffle on the TI-85:
:ClLCD :Disp "KNUTH SHUFFLE" :Disp "How many items?" :Prompt N : :seq(x,x,1,N,1)→S :For(I,1,N) :round(rand*(dimL S)+.4999,0)→D :S(D)→TEMP :S(I)→S(D) :TEMP→S(I) :End : :Disp S
Ta-dah.
0 Comments:
Post a Comment
« Home
Post a Comment