Programa clasifica un numero segun si es positivo o negativo o neutro

Este programa esta hecho en .net

Public Class Form28
    REM DECLARAR TODAS LAS VARIABLES
    Dim numero As Double, clasificar As String
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        REM VALIDAR LOS OBJETOS DE ENTRADA
        If Me.ONUMERO.Text = "" Then
            MsgBox(" FAVOR DIGITE EL NUMERO ")
            Me.ONUMERO.Focus()
        Else
            REM ASIGNAR VALORES A LAS VARIABLES DE ENTRADA
            numero = Me.ONUMERO.Text

            REM PROCESO
            If numero = 0 Then
                clasificar = " EL NUMERO ES NEUTRO "
            Else
                If numero > 0 Then
                    clasificar = " EL NUMERO ES POSITIVO "
                Else
                    If numero < 0 Then
                        clasificar = " EL NUMERO ES NEGATIVO "
                    Else
                    End If
                End If
            End If

            REM ASIGNAR VALORES A LOS OBJETOS DE SALIDA

            Me.Label4.Text = clasificar

        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.ONUMERO.Text = ""
        Me.Label4.Text = ""
        Me.ONUMERO.Focus()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If (MsgBox(" ¿DESEA SALIR ? ", MsgBoxStyle.OkCancel + MsgBoxStyle.Information, " ADVERTENCIA ")) = MsgBoxResult.Ok Then
            Me.Close()

        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

Como sobrevivir a mi ex