21 lines
483 B
Python
21 lines
483 B
Python
from math import sqrt
|
|
a = int(input("a : "))
|
|
b = int(input("b : "))
|
|
c = int(input("c : "))
|
|
|
|
delta = (( b - a ) ** 2) - (4 * (c - 3))
|
|
|
|
if delta < 0 :
|
|
print("pas d'inté")
|
|
elif delta == 0 :
|
|
x = (-1 * (b - a)) / 2
|
|
y = a * x + 3
|
|
print("1 inté x :", x, " y :", y)
|
|
else :
|
|
x1 = (-1 * (b - a) - sqrt(delta)) / 2
|
|
x2 = (-1 * (b - a) + sqrt(delta)) / 2
|
|
|
|
y1 = (a * x1) + 3
|
|
y2 = (a * x2) + 3
|
|
print("2 inté : x1 :", x1, " y1 :", y1, " x2 :", x2, " y2 :", y2)
|