![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Dec 2005
Location: Oregon
Posts: 22
Rep Power: 0
![]() |
TI89 programming
I'm not sure this is the right forum, but here is my problem. I am creating a program that solves the quadratic formula using the values you insert. You can select different menu items to obtain an approximate or exact (radicals and such) answer, or you can select whether your answers are real or complex. This program will evolve to not depend on the selection menu positive and negative, but for now, I just need to figure out how to make it work.
I keep getting a "Missing (" error on my Texas Instruments 89 calculator when I run my program: quad()
Prgm
ClrIO
Dialog
Title "Quadratics Solver"
Text " Solving Ax®+Bx+C"
Text " By Glen Winters"
Text " Version 1.0"
EndDlog
If ok=0 Then
Goto end
EndIf
Lbl top
Toolbar
Title "Quadratics"
Item "Neg",n
Item "Pos",p
Title " i?"
Item "Real",r
Item "Complex",c
Title "Precise"
Item "Exact",e
Item "Approx",a
EndTBar
Lbl n
Input "A?",a1
Input "B?",b1
Input "C?",c1
(b1^2-4*a1*c1)»d1
If d1<0 Then
If (setMode("Complex Format","RECTANGULAR")) Then
Goto end2
EndIf
Disp "No real solutions"
Else
((ªb1^2+§(d1))/(2*a1))»ans1
Disp ans1
EndIf
Goto end2
Lbl p
Input "A?",a2
Input "B?",b2
Input "C?",c2
(b2^2-4*a2*c2)»d2
If d2<0 Then
If (setMode("Complex Format","RECTANGULAR")) Then
Goto end2
EndIf
Disp "No real solutions"
Else
((ªb2^2-§(d2))/(2*a2))»ans
Disp ans
Goto end2
Lbl r
setMode("Complex Format","REAL")
Goto top
Lbl c
setMode("Complex Format","RECTANGULAR")
Goto top
Lbl e
setMode("Exact/Approx","EXACT")
Goto top
Lbl a
setMode("Exact/Approx","APPROXIMATE")
Goto top
Lbl end2
setMode("Complex Format","REAL")
EndPrgmThanks in advance!
__________________
--Programmer in-training-- "I think there is a world market for maybe five computers." - Thomas Watson, chairman of IBM, 1943 Last edited by Mouche; Feb 11th, 2006 at 3:06 AM. Reason: Needed more detail |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|