I need help on this program i'm making to solve quadratic discriminants.
code here
[codebox]"ENTER A"->A
"ENTER B"->B
"ENTER C"->C
-(B )->D
B-4(A )(C )->F
IF -/F=INT F
THEN -/F
IFEND
C-F/2(A)->G
C+F/2(A)->H
CLEARTEXT
LOCATE G
LOACTE H[/codebox]
-/ is radical sign
Casio Quadratic Discriminant
Started by
one2fight4
, Apr 27 2007 02:32 AM
1 reply to this topic
#1
Posted 27 April 2007 - 02:32 AM
#2
Posted 28 April 2007 - 08:49 AM
I vieuw years ago I wrote this
Lbl 1
ClrText
"ax#E5C2+bx+c=0"
"a="?->A
"b="?->B
"c="?->C
"D="
B^2-4(AC)->D
D_
If D<0
Then "Geen oplossingen"
Goto 0
Else "x="
(-B+\sqrtD)/2A_
If D<>0
Then "x="
(-B-\sqrtD)/2A_
IfEnd
Goto 0
Lbl 0
"Opnieuw?"_
Goto 1
Works fine.
Lbl 1
ClrText
"ax#E5C2+bx+c=0"
"a="?->A
"b="?->B
"c="?->C
"D="
B^2-4(AC)->D
D_
If D<0
Then "Geen oplossingen"
Goto 0
Else "x="
(-B+\sqrtD)/2A_
If D<>0
Then "x="
(-B-\sqrtD)/2A_
IfEnd
Goto 0
Lbl 0
"Opnieuw?"_
Goto 1
Works fine.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users