mercredi 4 mai 2022

TI-BASIC: Getting "ERROR: ARGUMENT" on my dice simulation program using randInt

I have a TI-84 Plus CE, and I'm trying to create a random integer dice rolling program. For my code I have:

ClrHome
Menu("HOW MANY SIDES?","4",A,"6",B,"8",C,"10",D,"12",E,"20",F)
Lbl A
randInt(1,4,1)➔G
Disp G
Stop
Lbl B
randInt(1,6,1)➔H
Disp H
Stop
Lbl C
randInt(1,8,1)➔I
Disp I
Stop
Lbl D
randInt(1,10,1)➔J
Disp J
Stop
Lbl E
randInt(1,12,1)➔K
Disp K
Stop
Lbl F
randInt(1,20,1)➔L
Disp L
Stop

I'm expecting:

HOW MANY SIDES?
1:4
2:6
3:8
4:10
5:12
6:20

And then a response like {8}. I assume the issue is with the randInt portions of the program, but I don't know how to fix it. I'd appreciate if anyone can help out with this. Thanks!




Aucun commentaire:

Enregistrer un commentaire