pastebin

Paste Search Dynamic
Recent pastes
delta
  1. from math import sqrt
  2. a = 1
  3. b = -5
  4. c = 6
  5. delta = b * b - 4 * a * c
  6. if (delta <0):
  7.     print("vo nghiem")
  8. elif(delta==0):
  9.         print("nghiem la :",-b/2*a)
  10. else:
  11.     x1=(-b-sqrt(delta))/2*a
  12.     x2=(-b+sqrt(delta))/2*a
  13.     print("nghiem 1 = ", x1)
  14.     print("nghiem 2 = ", x2)
Parsed in 0.007 seconds