Baixe o app para aproveitar ainda mais
Prévia do material em texto
Sub Triangulo() Dim l1 As Single, l2 As Single, l3 As Single l1 = InputBox("Digite o lado 1") l2 = InputBox("Digite o lado 2") l3 = InputBox("Digite o lado 3") If l1 < l2 + l3 And l2 < l1 + l3 And l3 < l1 + l2 Then MsgBox ("Triângulo válido") If l1 = l2 And l2 = l3 Then MsgBox ("Equilátero") ElseIf l1 <> l2 And l2 <> l3 And l1 <> l3 Then MsgBox ("Escaleno") Else MsgBox ("Isósceles") End If Else MsgBox ("Triângulo inválido") End If End Sub
Compartilhar