GroZnik81

2D

Apr 19th, 2020
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a1=float(input())
  2. b1=float(input())
  3. a2=float(input())
  4. b2=float(input())
  5. #дължината и височина на страните а1-а2 и б1-б2
  6. daljina = abs(a1-a2)
  7. visochina = abs(b1-b2)
  8. lice = daljina*visochina
  9. #perimetyr = (2 * (daljina+visochina))
  10. perimetyr =daljina+daljina+visochina+visochina
  11. print(f"{lice:.2f}")
  12. print(f"{perimetyr:.2f}")
RAW Paste Data