Search Tools Links Login

Positive and Negative Number Checker


A simple program that I wrote using Microsoft Visual Basic 5 to check if the given integer number by our user is a positive or negative number. The program code is very simple and easy to understand.

Private Sub Command1_Click()

    number_value = Val(Text1.Text)
        If (number_value >= 0) Then
        Label4.Caption = "The given number " & number_value & " is a Positive Number."
    Else
        Label4.Caption = "The given number " & number_value & " is a Negative Number."
    End If

End Sub

Private Sub Command2_Click()
    Text1.Text = ""
    Label4.Caption = " "
End Sub

About this post

Posted: 2020-01-02
By: JakeRPomperada
Viewed: 203 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.