Fermer2
loclamorLe 24/08/2007 à 14:28
Voici un exemple programme assez utile : il donne les racines d’une équations du second degré. Nommer ce programme DEGRE2.
éspace mémoire : environ 515


Lbl 1
0→A:0→B:0→C:0→V:0→W:0→D
ClrHome
Output(6,1,"EDIT BY LOCLAMOR"
Output(7,1,"----------------"
Disp "ax2+bx+c=0   a≠0"
Input "a=",A
If A=0:Goto 1
Output(6,1,"EDIT BY LOCLAMOR"
Output(7,1,"----------------"
Input "b=",B
Output(6,1,"EDIT BY LOCLAMOR"
Output(7,1,"----------------"
Input "c=",C
B2-4AC→D
ClrHome
Disp "DELTA ="
Output(1,9,D
If D>0:Then
Disp "DEUX SOLUTIONS :"
Disp "x1 ="
(-B+√(D))/(2A)→V
Output(3,6,V
Disp "x2 ="
(-B-√(D))/(2A)→W
Output(4,6,W
End
If D=0:Then
Disp "UNE SOLUTION :"
Disp "x1 ="
-B/(2A)→V
Disp ""
Output(3,6,V
End
If D<0:Then
Disp "PAS DE SOLUTION","",""
End
Disp ""
Output(5,1," x1=V      x2=W"
Disp "EDIT BY LOCLAMOR"
Disp "----------------"
Output(1,1,""


[right]LABEL GOOD PRGM aposed by The Best Program Corporation[/right]

un de mes premier prgm smile tjs aussi pratique !