Advertisement
Guest User

1036

a guest
Apr 7th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import math
  2.  
  3. a, b, c = input().split()
  4. a, b, c = float(a), float(b), float(c)
  5.  
  6. if b**2 >= 4*a*c :
  7.     y = math.sqrt(b**2 - 4*a*c)
  8.     R1 = (-b + y)/ (2* a)
  9.     R2 = (-b - y)/ (2* a)
  10.     print("R1 = " + "{:.5f}".format(R1))
  11.     print("R2 = " + "{:.5f}".format(R2))
  12. else:
  13.     print("Impossivel calcular")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement