2nd degree equations (copie)


No notes were written for this algorithm.

Preview of this algorithm

Icon Variable
Ask for a with default a
Icon Variable
Ask for b with default b
Icon Variable
Ask for c with default c
Icon Variable
Set f(x) to a(x) ^ 2 + bx + c
Icon Structure
If a = 0
Icon Variable
Set f(x) to bx + c
Icon Structure
If b <> 0
Icon Variable
Set x to ( -c) / (b)
Icon Output
Print variable x
Icon Structure
Else
Icon Output
Print text Pas de solution
Icon Structure
End
Icon Structure
Else
Icon Variable
Set delta to b * b - 4 * a * c
Icon Structure
If delta = 0
Icon Variable
Set x_0 to (- b) / (2 * a)
Icon Output
Print variable x_0
Icon Structure
Else
Icon Structure
End
Icon Structure
End