Advertisement
dream_4ild

9-И-2 ex.5

Dec 10th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Sat Nov 21 17:06:32 2020
  4.  
  5. @author: Sergey
  6. """
  7.  
  8. a,b,c=float(input()),float(input()),float(input())
  9. D=(b**2)-4*a*c
  10. if D>0:
  11.     print('x1 =',(-b+(D**(1/2)))/(2*a))
  12.     print('x2 =',(-b-(D**(1/2)))/(2*a))
  13. elif D==0:
  14.     print('x =', (-b)/(2*a))
  15. else:
  16.     print('Нет действительных корней')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement