Texas Instruments TI-89 Titanium User Manual page 627

Hide thumbs Also See for TI-89 Titanium:
Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents