Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input("Podaj bok a: "))
- b = int(input("Podaj bok b: "))
- c = int(input("Podaj bok c: "))
- if a > 0 and b > 0 and c > 0:
- print("Liczby dodatnie!")
- if a + b > c and a + c > b and b + c > a:
- if a * a + b * b == c * c or a * a + c * c == b * b or b * b + c * c == a * a:
- print("Podany trójkąt jest prostokątny")
- elif a * a + b * b < c * c or a * a + c * c < b * b or c * c + b * b < a * a:
- print("Podany trójkąt jest ostrokątny")
- elif a * a + b * b > c * c or a * a + c * c > b * b or c * c + b * b > a * a:
- print("Podany trójkąt jest rozwartokątny")
- else:
- print("Nie można stworzyć trójkąta!")
- else:
- print("Podano liczbę ujemną!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement