mutantcamel
Experienced Member
- Joined
- Dec 14, 2007
- Messages
- 76
This should be a simple one. What the program should do is ask me for 8 letters which can either be vowels or consonants and then display the results.
Well I'm using an old TI99 program which works to some extent. At the moment I'm only being allowed to pick only 6 letters, after my 6th choice, 8 letters are being returned on the screen. How this is happening, I have no idea!
(note the call key has only 2 variables not 3 like TI Basic!)
The program listing is:
100 RANDOMIZE
110 B1$="AEIOUY"
120 B2$="BCDFGHJKLMNPQRSTVWXZ"
130 PRINT "VOWEL OR CONSONANT (V/C) ?"
140 FOR CC=1 TO 8
150 CALL KEY (AW,S)
160 IF AW=86 THEN 190
170 IF AW=67 THEN 210
180 GOTO 150
190 C$=SEG$(B1$,INT(RND*6+1),1)
200 GOTO 220
210 C$=SEG$(B2$,INT(RND*20+1),1)
220 Z$=Z$&C$
230 NEXT CC
240 PRINT "YOU HAVE THE FOLLOWING"
250 PRINT "LETTERS: ":Z$
I'm sure this could be changed to something easier and I'm not sure about line 220, any ideas???
Well I'm using an old TI99 program which works to some extent. At the moment I'm only being allowed to pick only 6 letters, after my 6th choice, 8 letters are being returned on the screen. How this is happening, I have no idea!
(note the call key has only 2 variables not 3 like TI Basic!)
The program listing is:
100 RANDOMIZE
110 B1$="AEIOUY"
120 B2$="BCDFGHJKLMNPQRSTVWXZ"
130 PRINT "VOWEL OR CONSONANT (V/C) ?"
140 FOR CC=1 TO 8
150 CALL KEY (AW,S)
160 IF AW=86 THEN 190
170 IF AW=67 THEN 210
180 GOTO 150
190 C$=SEG$(B1$,INT(RND*6+1),1)
200 GOTO 220
210 C$=SEG$(B2$,INT(RND*20+1),1)
220 Z$=Z$&C$
230 NEXT CC
240 PRINT "YOU HAVE THE FOLLOWING"
250 PRINT "LETTERS: ":Z$
I'm sure this could be changed to something easier and I'm not sure about line 220, any ideas???
Last edited: