von *dumdidi » Di 20. Dez 2005, 00:07
So nun aber der letzte Beitrag :)
hier nochma der optimierte Code:
ClrText
"F(X)=AX²+BX+C"
"A"?->A
"B"?->B
"C"?->C
B/A->P
C/A->Q
ClrText
If P²>4Q
Then -P/2+Wurzel((P/2)²-Q)->X
Locate 1,1,"X1="
Locate 4,1,X
-P/2-Wurzel((P/2)²-Q)->Y
Locate 1,2,"X2="
Locate 4,2,Y
Else If P²=4Q
Then -P/2->X
Locate 1,1,"X1/2="
Locate 6,1,X
Locate 1,3,"SP IST NULLSTELLE"
Locate 1,4,"(DOPPELTE NULLSTELLE)"
Else Locate 1,1,"KEINE NULLSTELLE"
If A>0
Then Locate 1,3,"SP UEBER X-ACHSE UND"
Locate 1,4,"NACH OBEN OFFEN"
Else Locate 1,3,"SP UNTER X-ACHSE UND"
Locate 1,4,"NACH UNTEN OFFEN"
IfEnd
IfEnd
IfEnd