Toggle navigation
Delta: Algorithms
Download
Documentation
Partners
2nd degree equations (copie)
No notes were written for this algorithm.
Preview of this algorithm
Variable
Ask for a with default a
Variable
Ask for b with default b
Variable
Ask for c with default c
Variable
Set f(x) to a(x) ^ 2 + bx + c
Structure
If a = 0
Variable
Set f(x) to bx + c
Structure
If b <> 0
Variable
Set x to ( -c) / (b)
Output
Print variable x
Structure
Else
Output
Print text Pas de solution
Structure
End
Structure
Else
Variable
Set delta to b * b - 4 * a * c
Structure
If delta = 0
Variable
Set x_0 to (- b) / (2 * a)
Output
Print variable x_0
Structure
Else
Structure
End
Structure
End