EasyManua.ls Logo

Texas Instruments Voyage 200 - Page 637

Texas Instruments Voyage 200
1008 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...
Programming 637
Example 1
Example 1Example 1
Example 1
This example uses
InputStr for input, a While...EndWhile loop to calculate the result, and
Text to display the result.
Ê
Prompts for input on Program I/O screen.
Ë Converts string entered with InputStr to an expression.
Ì Loop calculation.
Í Displays output in a dialog box.
Note:
For {, type (zero). For &, press:
2
H
Ê
Ë
Ì
©Ì
©Ì
Ì
Í
:prog1()
:Prgm
:InputStr "Enter an integer",n
:expr(n)!n
:0!temp:1!I
:While i{n
: temp+i!temp
: i+1!I
:EndWhile
:Text "The answer is "&string(temp)
:EndPrgm

Table of Contents

Other manuals for Texas Instruments Voyage 200

Related product manuals