Programming
638
Example 2
Example 2
Example 2
Example 2
This example uses
Prompt
for input,
Lbl
, and
Goto
to create a loop, and
Disp
to display
the result.
Ê
Prompts for input on Program I/O screen.
Ë
Loop calculation.
Ì
Displays output on Program I/O screen.
Note:
Because
Prompt
returns
n
as a number, you do not need to use
expr
to convert
n
.
Ê
Ë
©
©
©
Ë
Ì
:prog2()
:Prgm
:Prompt n
:0
!
temp:1
!
I
:Lbl top
: temp+i
!
temp
: i+1
!
I
: If i
{
n
: Goto top
:Disp temp
:EndPrgm
Summary of Contents for Voyage 200
Page 36: ...Getting Started 36 D B D B Press Result ...
Page 45: ...Getting Started 45 3 0 D B D D B D Press Result ...
Page 46: ...Getting Started 46 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Page 60: ...Getting Started 60 B D Press Result ...
Page 139: ...Previews 139 8 Complete the operation Press 2 d Steps and keystrokes Display 5 f 2 ...
Page 453: ...Differential Equation Graphing 453 ...
Page 468: ...Tables 468 ...
Page 777: ...Activities 777 ...