-
-
Save fearoffish/5492701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Module1 | |
Sub Main() | |
Dim intNumber1, intNumber2 as Integer | |
Dim strOperator As String | |
Do | |
strOperator = InputBox("Please choose an operator to use: +, -, *. Or type Q to quit.") | |
If strOperator = "Q" Then Exit | |
intNumber1 = InputBox("Please Enter The Value For The First Number") | |
intNumber2 = InputBox("Please Enter The Value For The Second Number") | |
If strOperator = "+" Then Call Add(Number1, Number2) | |
If strOperator = "-" Then Call Subtract(Number1, Number2) | |
If strOperator = "*" Then Call Multiply(Number1, Number2) | |
Loop | |
End Sub | |
Sub Add(ByVal Number1, ByVal Number2) | |
MsgBox("The Total is " & (Number1 + Number2)) | |
End Sub | |
Sub Subtract(ByVal Number1, ByVal Number2) | |
MsgBox("The Result Of Subtraction Is " & (Number1 - Number2)) | |
End Sub | |
Sub Multiply(ByVal Number1, ByVal Number2) | |
MsgBox("The Result Of Multiply is " & (Number1 * Number2)) | |
End Sub | |
End Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment