EasyManua.ls Logo

Texas Instruments TI-99/4A - Page 181

Texas Instruments TI-99/4A
204 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Codebreaker
These
statements
print the
score
for
each
guess. Strini;S
are
used
in
di~pl[1Ying
the
score
to
insure
that
the
score
is
always
displayed
in
the
"N.R
" format.
If
the
score
is an
integer
number.
then
a
".0"
(line
370)
must
be
added
after
the number. If
the
score
is less
than
one,
then
u
"0"
(line
'100)
must
be
added
before
the
number,
lfthe
score
is
a non-integer
and
Kfeater
than
one.
then
just
the
score
itself is
printed
(line 420). If
the
score
is not equal to 4. the
program
transfers
to
line
210
to
accept
another
guess.
These
statements
print
the
number
of tries you
took
to guess
the
code
number.
Then
the
computer
asks
if you
want
to play
again.
If
you
enter
Y.
the
program
transfers
to
line
110
to
generate
a
new
number
If
you
enter
anything else. the
program
stops.
Here
is
a
sample
of a
program
run.
(Of
course,
your
code
numbers
will
be
different.)
User's
Reference
Guide
Examples:
>360
IF
INT(SCORE)<>SCORE
THE
N
390
>370 PRINT
STR$(SCORU&".O"
>380
GDrD
430
>390
IF
SCORE>1
THEN
420
>400 PRINT "O"&STR$(SCORE)
>410
GOTO
430
>420
PRINT
STR$(SCORE)
>430
IF SCORE<>4
THEN
210
>440 PRINT
"YOU
TOOK
"&STR$(T
RIES)&"
TRIES
TO
GUESS"
>450
PRINT
"THE
CODE
NUMBER."
>460
DISPLAY
">I0ULD
YOU
LIKE
TO
PLAY
AGAIN"
>470
INPUT
"ENTER
Y
OR
N:
":A
:t
>480
IF
A$="Y"
THEN
110
>490
END
>RUN
--screen
clears
ENTER
GUESS?
1234
0.1
ENTER
GUESS?
5678
2.1
ENTER
GUESS?
9238
1.0
ENTER
GUESS?
~694
1.0
ENTER
GUESS?
5198
2.1
ENTER
GUESS?
5715
4.0
YOU
TOOK
6 TRIES
TO
GUESS
THE
CODE
NUMBER.
WOULD
YOU
LI~E
TO
PLAT
AGAIN
ENTER
Y
OR
N:
N
**
DONE
**
IIIĀ·25

Other manuals for Texas Instruments TI-99/4A

Related product manuals