add reply  new poll 

 Displaying Variables In An Equation
craigster266
Posted: Oct 4 2009, 02:45 PM


Newbie


Group: Members
Posts: 5
Member No.: 7,431
Joined: 4-October 09



Hi, I have to write a short program on the TI84 for a course. Now, I don't want to know the full solution. But can anyone tell me how I can display an expresson. For example, Multiplying out the brackets in (x+a)(x+cool.gif where the variables A and B have been generated randomly beforehand? The only workaround that I've found is to display the expression (using Disp ""), then display what the values of A and B are.
Top
craigster266
Posted: Oct 4 2009, 02:47 PM


Newbie


Group: Members
Posts: 5
Member No.: 7,431
Joined: 4-October 09



I meant (x + cool.gif, but it came out as a smilie!
Top
craigster266
Posted: Oct 4 2009, 04:21 PM


Newbie


Group: Members
Posts: 5
Member No.: 7,431
Joined: 4-October 09



here's what I finally came up with. It's not pretty, but it works:

:ClrHome
:1→X
:randInt(‾5,5)→A
:randInt(‾5,5)→B
:Output(1,1,"MULTIPLY OUT"):Output(2,1,"THE BRACKETS")
:Output(3,1,"TO FIND THE")
:Output(4,1,"COEFFIENT OF X")
:Output(5,1,"AND THE CONSTANT")
:Output(6,1,"IN (X+A)(X+B )")
:Output(7,1,"WHERE A IS"):Output(7,12,A)
:Output(8,1,"AND B IS"):Output(8,10,B 0
:X*B→C
:X*A→D
:A*B→E
:Pause
:ClrHome
:Disp "THE COEFFICIENT"
:Input "OF X?",T
:Input "CONSTANT?",S
:C+D→F
:Disp "COEFFICIENT"
:Disp "OF X IS",F
:Disp "B IS",E
:If T=F and S=E
:Then
:Disp "CORRECT"
:Else
:Disp "WRONG"
Top
tifreak8x
Posted: Oct 5 2009, 01:55 PM


photoninator


Group: Admin
Posts: 3,253
Member No.: 1
Joined: 11-August 04



Sorry for the delay in replies, I will take a look at this code here after while and see what I can't come up with that would be smaller or more efficient. ^ ^
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | 82/83/83+/84+ | Next Newest »


Topic Options add reply  new poll 




Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0632 seconds | Archive
TI-Freakware's TI Ring
TI-Freakware's TI Ring
[ Join Now | Ring Hub | Random | << Prev | Next >> ]