Mancolo

Untitled

Sep 29th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a = int(input("Введите число a:"))
  2. b = int(input("Введите число b:"))
  3. c = int(input("Введите число c:"))
  4. d = int(input("Введите число d:"))
  5. e = int(input("Введите число e:"))
  6. f = int(input("Введите число f:"))
  7. g = int(input("Введите число g:"))
  8. k = int(input("Введите число k:"))
  9. p = int(input("Введите число p:"))
  10.  
  11. if f==0:
  12.     print("f can not be 0")
  13.     quit()
  14. elif a==0:
  15.     print ("a can not be 0")
  16.     quit()
  17.  
  18. ex1 = a *c + b * c + d * e / f
  19. ex2 = k + p * b / a + g
  20. ex3 = 4 / 5
  21. ex4 = ex1 / ex2 * ex3
  22.  
  23. if ex2 == 0:
  24.     print ("error")
  25.     quit()
  26. else:
  27.     print ("Ответ:", "", ex4)
  28.  
Add Comment
Please, Sign In to add comment