Sharp PC-1403 Operation Manual page 149

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

143
Note: The execution
of
the
FOR-NEXT loop
does
to
the end even it it jumps out of the
loop.
Therefore,
note
that
a
nesting
error
of
the FOR-NEXT loop (ERROR 5}
may result depending on the program
(programs
which execute the FOR
command a number
of
times).
This
group
of statements computes
and
prints
N
factorial
for
the numbers
from 1
to 10.
70
FOR
N=1TO10
80
X=1
90
FOR F=1
TON
100 X=X*F
110
NEXT F
120
PRINT X
130 NEXT N
40
FOR
N=10 TO 0
STEP
-1
J
This group
of
statements counts
down
10, 9,
50
PRINT
N
8, 7, 6,
5,
4,
3, 2, 1, 0.
60
NEXT N
This group of statements pri
n
ts the numbers
1,
2,
3, 4,
5.
J
10 FOR
1=1 TO 5
20
PRINT
I
30 NEXT I
Examples
Verbs
FOR ... TO

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents