Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Feb 11th, 2006, 3:03 AM   #1
Mouche
Newbie
 
Mouche's Avatar
 
Join Date: Dec 2005
Location: Oregon
Posts: 22
Rep Power: 0 Mouche is on a distinguished road
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")
EndPrgm

Thanks 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
Mouche is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:36 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC