Programa calcula que tipo de triangulo es segun sus lados

Public Class Form27

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim LA As Single
        Dim LB As Single
        Dim LC As Single
        LA = TextBox1.Text
        LB = TextBox2.Text
        LC = TextBox3.Text

        If ((LA + LB) < LC And (LB + LC) < LA And (LA + LC) < LB) Then
            Label4.Text = "NO ES UN TRIANGULO"
        Else
            If (LA = LB And LA = LC And LB = LC) Then
                Label4.Text = "ES UN TRIANGULO"
                Label5.Text = "EQUILATERO"
            Else
                If ((LA <> LB) And (LA <> LB) And (LB <> LC)) Then
                    Label4.Text = "ES UN TRIANGULO"
                    Label5.Text = "ESCALENO"
                Else
                    If (LA = LB Or LB = LC Or LA = LC) Then
                        Label4.Text = "ES UN TRIANGULO"
                        Label5.Text = "ISOCELES"
                    Else
                        Label4.Text = "NOSE"
                    End If

                End If
            End If
        End If
    End Sub

End Class

Comentarios

Entradas populares de este blog

Google Glass llegará al mercado en 2014

Suma y Multiplicacion de Matrices php

Para Hombres griego