TI-92 Tutorial
Excel 2007
Tutorial

Programming with TI-92 Calculator



This exercise demonstrates how to write a program with the TI-92 calculator. This program will calculate compounded interest.

Program Editor

To open the program editor, press the APPS key and label the program prog1.


The next screen will show the program editor.


Use the text below to write the interest calculation program. When you exit the program editor, the calculator will save the program. (The symbol » is STO)

prog1()
Prgm
getMode("ALL")»m
Lbl a
ClrIO
Local inv,interest,n,y,p,pay
setMode("Exact/Approx","APPROXIMATE")
setMode("Display Digits","FIX 2")
Dialog
Title "COMPOUND INTEREST CALCULATOR "
Request "Investment Amount",inv
Request "Interest Rate (%)",interest
Request "Years of Investment",y
Request "Times Compounded/yr",n
EndDlog
expr(inv)»inv
expr(interest)»interest
expr(y)»y
expr(n)»n
inv*(1+interest/100/n)^(n*y)»pay
Disp "Your Ending Balance is",pay,"Dollars"
PopUp {"Retry","Quit"},b
If b=1
Goto a
setMode(m)
ClrIO
EndPrgm

To run a program from the home screen, type the name of the program and closed parentheses at the end as shown below.


Press Enter.


Enter some values and press Enter twice.



Note that the program writes to the IO (Input/Output) screen. When you press 2: Quit the program will stay on this screen. Press F5 PrgmIO to return to the home screen.


If you press F5 again it will return you to the program output screen.

Exercise

Write program to calculate the monthly payment M on a loan of P dollars for t

years at an interest rate of r percent (entered as a decimal) per year. The

formula is


loan()
Prgm
getMode("ALL")»m
Lbl a
Local p,interest,y,pay,d,z
setMode("Exact/Approx","APPROXIMATE")
setMode("Display Digits","FIX 2")
Dialog
Title "LOAN CALCULATOR"
Request "Loan Amount",p
Request "Interest Rate (%)",interest
Request "Years",y
EndDlog
expr(p)»p
expr(interest)»interest
expr(y)»y
interest/100/12»d
d*p/(1-(1+d)^(-12*y))»pay
pay*12*y-p»z
Disp "-Monthly Payment-",pay,"Total Interest",z
PopUp {"Retry","Quit"},b
If b=1
Goto a
setMode(m)
EndPrgm