EasyManuals Logo

Texas Instruments Voyage 200 User Manual

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
Page #640 background imageLoading...
Page #640 background image
Programming 640
Example 4
Example 4Example 4
Example 4
This example uses built-in functions to calculate the result without using a loop.
Ê
Prompts for input on Program I/O.
Ë Calculates sum.
Ì Displays output on Program I/O screen.
Note:
Because Input returns n as a number, you do not need to use expr to convert n.
Ê
Ë
Ì
:prog4()
:Prgm
:Input "Enter an integer",n
:sum(seq(i,i,1,n))!temp
:Disp temp
:EndPrgm
Function Used in this example to:
seq Generate the sequence of integers from 1 to n.
sum Sum the integers in the list generated by seq.
seq(expression, var, low, high [,step])
Ê expression used to generate the sequence
Ë variable that will be incremented
Ì initial and final values of var
Í
increment for var ; if omitted, uses 1
ÊËÌÌÍ

Table of Contents

Other manuals for Texas Instruments Voyage 200

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments Voyage 200 and is the answer not in the manual?

Texas Instruments Voyage 200 Specifications

General IconGeneral
TypeScientific
Form factorPocket
Product colorBlue
Display resolution128 x 240 pixels

Related product manuals