Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

1045 - Triangle Types

# 1045 triangle types

a, b, c = map(float, input().split())
list = sorted([a,b,c], reverse=True)
a = list[0]
b = list[1]
c = list[2]
if a>= (b+c):
    print("NAO FORMA TRIANGULO")
elif a*a == (b*b +c*c):
    print("TRIANGULO RETANGULO")
elif a*a > (b*b +c*c):
    print("TRIANGULO OBTUSANGULO")
elif a*a < (b*b +c*c):
    print("TRIANGULO ACUTANGULO")

if a == b and b == c :
    print("TRIANGULO EQUILATERO")
elif a==b or b==c:
    print("TRIANGULO ISOSCELES")
 
PREVIOUS NEXT
Tagged: #Triangle #Types
ADD COMMENT
Topic
Name
6+9 =