Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############INIT################
- x1 = float(input("Введите X1: "))
- x2 = float(input("Введите X2: "))
- a = float(input("Введите a: "))
- if x1 < x2:
- temp = x1
- x1 = x2
- x2 = temp
- #################################
- #####CALCULATIO#####
- e = x1 * 2 * a
- f = x2 * 2 * a
- k = ( e - f)/2
- b = e - k
- D = k ** 2
- c = ((b**2-D)/(4*a))
- ####################
- ###########THE ANSWER###########
- print(str(a) + "x^2", end='')
- if not b == 0:
- print("+" + str(b) + "x", end='')
- if not c == 0:
- print("+" + str(c), end='')
- print("=0")
- ################################
- input("\n \npress ENTER")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement