Applications 17-9
8317APPS.DOC TI-83 international English Bob Fedorisko Revised: 02/19/01 1:00 PM Printed: 02/19/01 1:39 PM
Page 9 of 20
This program graphs the function A sin(BX) with random
integer coefficients between 1 and 10. Try to guess the
coefficients and graph your guess as C sin(DX). The
program continues until your guess is correct.
PROGRAM:GUESS
:PlotsOff :Func
:FnOff :Radian
:ClrHome
:"Asin(BX)"!Y1
:"Csin(DX)"!Y2
Define equations.
:GraphStyle(1,1)
:GraphStyle(2,5)
Set line and path
g
raph
styles.
:FnOff 2
:randInt(1,10)!A
:randInt(1,10)!B
:0!C:0!D
Initialize coefficients.
:L2p!Xmin
:2p!Xmax
:2!Xscl
:L10!Ymin
:10!Ymax
:1!Yscl
Set viewing window.
:DispGraph
:Pause
Display graph.
:FnOn 2
:Lbl Z
:Prompt C,D Prompt for guess.
:DispGraph
:Pause
Display graph.
:If C=A
:Text(1,1,"C IS OK")
:If CƒA
:Text(1,1,"C IS WRONG")
:If D=B
:Text(1,50,"D IS OK")
:If DƒB
:Text(1,50,"D IS WRONG")
Display results.
:DispGraph
:Pause
Display graph.
:If C=A and D=B
:Stop
:Goto Z
Quit if
g
uesses are
correct.
Using a Program to Guess the Coefficients
Setting Up the
Program
Program