Radio Shack TRS-80 User Manual page 193

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

42
FOR
C
=
1
TO
4
44
PRINT
"
M
,
"
"
,
"
48
NEXT
C
50
NEXT
B
60
NEXT
A
C
LOOP
SAMPLE
ANSWER FOR
EXERCISE
132:
The
program
will
be
the
same
as
the
answer
to
Exercise 13-1
with the following
additions:
45
FOR
D
=
1
TO
5
46
47
PRINT
NEXT
D
n
ii
tt
if
n
ii
it
D
LOOP
Note:
To
get
the
full
impact of
this
"4-deep"
nesting,
stop the
RUN
frequently
to
examine
the nesting
relationships
between
each of the
loops.
SAMPLE
ANSWER FOR
EXERCISE
14-1:
Addition
of the following
single line gives
a nice clean printout
with
all
values
"rounded"
to
their integer value:
55
A =
INT(A)
Worth
all
the
effort to learn
it,
wasn't
it?
SAMPLE
ANSWER FOR
EXERCISE
14-2:
55
A =
INTC
10
*
A)/10
When
3.14159 was
multiplied times
If) it
became
31.4159.
The
INTEGER
value of
31.4159
is
31.
31
divided
by 10
is
3.1.
Etc.
191

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents