Texas Instruments TI-89 Manual Book page 329

Ti ti-89: user guide
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Example 4
Example 5
Note: Because Input
returns n as a number, you
do not need to use expr to
convert n.
312
Chapter 17: Programming
This example uses
Dialog...EndDlog
and output. It uses
Loop...EndLoop
Defines a dialog box
for input.
Converts string entered
with Request to an
expression.
Loop calculation.
Defines a dialog
box for output.
This example uses the
TI-89 / TI-92 Plus
the result without using a loop.
Prompts for input on
Program I/O screen.
Calculates sum.
Displays output on
Program I/O screen.
Function
Used in this example to:
Generate the sequence of integers from
seq
seq( expression , var , low , high [, step ])
Sum the integers in the list generated by
sum
to create dialog boxes for input
to calculate the result.
:prog4()
:Prgm
:Dialog
: Title "Enter an integer"
: Request "Integer",n
:EndDlog
:expr(n)! n
:0! temp:0! i
:Loop
: temp+i! temp
: i+1! i
: If i>n
:
Exit
:EndLoop
:Dialog
: Title "The answer is"
: Text string(temp)
:EndDlog
:EndPrgm
built-in functions to calculate
:prog5()
:Prgm
:Input "Enter an integer",n
:sum(seq(i,i,1,n))! temp
:Disp temp
:EndPrgm
increment for var ;
if omitted, uses 1.
initial and final values of var
variable that will be incremented
expression used to generate the sequence
to
.
1
n
.
seq

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents