-
Notifications
You must be signed in to change notification settings - Fork 0
/
1045.py
58 lines (47 loc) · 1.06 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
strA, strB, strC = input().split()
maior = 0
meio = 0
menor = 0
strA = float(strA)
strB = float(strB)
strC = float(strC)
if strA > strB and strA > strC:
maior = strA
if strB > strC:
meio = strB
menor = strC
else:
meio = strC
menor = strB
if strB > strA and strB > strC:
maior = strB
if strA > strC:
meio = strA
menor = strC
else:
meio = strA
menor = strC
else:
maior = strC
if strA > strB:
meio = strA
menor = strB
else:
meio = strB
menor = strA
A = float(maior)
B = float(meio)
C = float(menor)
if A >= B+C:
print("NAO FORMA TRIANGULO")
else:
if A**2 == B**2 + C**2:
print("TRIANGULO RETANGULO")
if A**2 > B**2 + C**2:
print("TRIANGULO OBTUSANGULO")
if A**2 < B**2 + C**2:
print("TRIANGULO ACUTANGULO")
if A == B == C:
print("TRIANGULO EQUILATERO")
if A == B != C or A == C != B or C == B != A:
print("TRIANGULO ISOSCELES")