Je l'ai pas encore testé avec les dernières modifications
Lbl 1
Clr Home
Prompt A,B,C
Clr Home
abs(B)=>S
If S<10
Then
0=>P
Goto 2
Else
If S>9
Then
1=>P
Goto 2
Else
If S>99
Then
2=>P
Goto 2
Else
if B>999
Then
Goto 2
Lbl 2
(B²-(4xAxC))=>D
Disp "DELTA",D
abs(D)=>T
rac(abs(D)=>J
If T<100
Then 0=>P
Goto 3
Else
If T>99
Then 1=>Q
Goto 3
Else
If T>999
Then 2=>Q
Goto3
Else
If T>9999
Then
3=>Q
Goto 3
Else
Goto 3
Lbl 3
(J-iPart(J))=>L
If L#0 //(#=différent)
Then
Goto 0
Else
If D>0
Then
((-B-rac(D))/(A))=>E
((-B+rac(D))/(2A))=>F
Disp "2 SOL R",E,F
Pause
Goto 1
Else
If D=0
Then((-B)/(2A))=>G
Pause
Goto 1
Else
If D<0
Then
(rac(D²))=>D
((-B-irac(D)/(2A))=>N //i [2nd] [.]
((-B+irac(D)/(2A))=>0
Disp "2 SOL CPX",N,O
Pause
Goto 1
Else
Lbl 0 //A partir de ce moment,rac(Delta) ne tombe pas juste on donne donc une valeur exacte.
If D>0
Then
Disp "2 SOL R"
Output(4,1,-B)
Output(4,3+P,"-rac("
Output(4,6+P,D)
Output(4,8+P+Q,")/")
output(4,10+P+Q,2A)
Output(5,1,-B)
Output(5,3+P,"+rac("
Output(5,6+P,D)
Output(5,8+P+Q,")/")
Output(5,10+P+Q,2A)
Pause
Goto 1
Else
If D<0
Then
rac(rac(D²))=>D
Disp "2 SOL CPX"
Output(4,1,-B)
Output(4,3+P,"-irac("
Output(4,7+P,D)
Output(4,9+P+Q,")/")
output(4,11+P+Q,2A)
Output(5,1,-B)
Output(5,3,+P"+irac("
Output(5,7+P,D)
Output(5,9+P+Q,")/")
Output(5,11+P+Q,2A)
Pause
Goto 1