TIB: Re: 83+ problem
[Prev][Next][Index][Thread]
TIB: Re: 83+ problem
This will(?) work on an 83 (I converted from an 86), I used it for a card
shuffling algorithm.
Using the list L1 with the information already in it:
:ClrHome
:Output(1,4,"%"
:For(X,1,dim(L1)
:Output(1,1,int (x/dim(L1)*100)
:randInt(1,dim(L1))->A
:L1(A)->B
:L1(X)->L1(A)
:B->L1(X)
:End
Once this finishes just pair L1(1) with L1(2), and 3 with 4, etc.
Andrew Hivner
(And if anyone has a better way to shuffle cards, let me know.)
>
> i am helping a teacher i know and he has asked me to write a program that
> takes the number of students and randomly pairs them together. i have no
> clue how to so this on a 83+ calc, so i am writing this to you. How would
> you guys do this?
> Thanks,
> Rob Smith
> ----
> Stupidity got us into this mess - why can't it get us out?
> Proud member of:
> * <http://pa.ticalc.org>Programmers Anonymous
> * <http://www.tigalaxy.com>TIGALAXY
> * <http://c489.tigalaxy.com>C489
> * <aim:addbuddy?screenname=Billvortex>Add Me To Your AIM Buddy List
>
>
>
References: