Private Sub cmdenter_Click()
Dim n1,n2 As Integer
n1=InputBox("Enter the first number","first")
n2=InputBox("Enter the first number","second")
If n1=n2 Then
Label1.Caption=n1 & "is equal to" & n2
Else
If n1>n2 Then
Label1.Caption=n1 & "is not equal to" & n2 & vbCrlf & n1 & "is greater than" & n2
Else
Label1.Caption=n1 & "is not equal to" & n2 & vbCrlf & n1 & "is lesser than" & n2
End If
End If
End Sub
Private Sub cmdexit_Click()
End
End Sub
Dim n1,n2 As Integer
n1=InputBox("Enter the first number","first")
n2=InputBox("Enter the first number","second")
If n1=n2 Then
Label1.Caption=n1 & "is equal to" & n2
Else
If n1>n2 Then
Label1.Caption=n1 & "is not equal to" & n2 & vbCrlf & n1 & "is greater than" & n2
Else
Label1.Caption=n1 & "is not equal to" & n2 & vbCrlf & n1 & "is lesser than" & n2
End If
End If
End Sub
Private Sub cmdexit_Click()
End
End Sub
No comments:
Post a Comment