Re: TI Programming, CRYPTO!


[Prev][Next][Index][Thread]

Re: TI Programming, CRYPTO!



If you are trying to just make a program to create the game for you just
do something like this:

[[(int rand 10)+1,(int rand 10)+1,(int rand 10)+1,(int rand 10)+1,(int
rand 10)+1]]->numbers

numbers(1,1) -> tot
2->curr
Lbl again
randint(5)->num
if num == 0
tot + numbers(1,curr) -> tot
if num == 1
tot - numbers(1,curr) -> tot
if num == 2
tot * numbers(1,curr) -> tot
if num == 3
tot / numbers(1,curr) -> tot
if num == 4
tot ^ numbers(1,curr) -> tot
curr + 1 -> curr
if curr < 6
goto again

disp numbers
disp " = ", tot






That will do it....you can add other stuff like another matrix to store
the functions that you are using.  I didn't put in the root thing, you can
put it in but you'll have to check the numbers before carrying out the
math.  Put in like


if int( tot ^ (1/numbers(1,curr))) == (tot ^ (1/nubmers(1,curr)))

to check to see if the root is an integer.

good luck


-Mike


References: