-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1045.py
80 lines (65 loc) · 1.32 KB
/
1045.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import math
A = float(input())
B = float(input())
C = float(input())
if A < B and A < C :
smaller = A
elif B < A and B < C:
smaller = B
elif C < A and C < B :
smaller = C
if B < A < C:
middle = A
elif C < A < B:
middle = A
elif A < B < C:
middle = B
elif C < B < A:
middle = B;
elif A < C < B:
middle = C
elif B < C < A:
middle = C
if A > B and A > C:
larger = A
elif B > A and B > C:
larger = B
elif C > A and C > B:
larger = C
if A == B and B > C:
middle=A
larger=B
elif A == C and C > B:
middle=A
larger=C
elif A == C and C > B:
middle=A
larger=C
if A == B and B < C:
middle = A
smaller = B
if A == C and C < B:
middle = A
smaller = C
if C == B and B < A:
middle = C
smaller = B
if A == B == C:
smaller = A
middle = B
larger = C
A = smaller
B = middle
C = larger
if A >= B + C:
print("NAO FORMA TRIANGULO")
if math.pow(A, 2) == math.pow(B, 2)+math.pow(C, 2):
print("TRIANGULO RETANGULO")
elif math.pow(A, 2) > math.pow(B, 2)+math.pow(C, 2):
print("TRIANGULO OBTUSANGULO")
elif math.pow(A, 2) < math.pow(B, 2)+math.pow(C, 2):
print("TRIANGULO ACUTANGULO")
if A == B == C:
print("TRIANGULO EQUILATERO")
elif A == B and B != C or C == A and B != A or C == B and C != A:
print("TRIANGULO ISOSCELES")