Created
April 30, 2013 23:26
-
-
Save anonymous/5492691 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 User, Number1, Number2, AddOutPut, SubtractOutPut, MultiplyOutPut As Integer | |
Dim Total, Y, N As String | |
User = InputBox("Please Choose two numbers 1 = Add 2 = SubTract 3 = Multiply") | |
Number1 = InputBox("Please Enter The Value For The First Number") | |
Number2 = InputBox("Please Enter The Value For The Second Number") | |
AddOutPut = Number1 + Number2 | |
SubtractOutPut = Number1 - Number2 | |
MultiplyOutPut = Number1 * Number2 | |
If User = 1 Then Call Add(Number1, Number2) | |
If User = 2 Then Call Subtract(Number1, Number2) | |
If User = 3 Then Call Multiply(Number1, Number2) | |
Total = InputBox("If you would like to keep going then type Y for Yes or N for No") | |
Do | |
User = Y | |
Loop | |
Do Until User = N | |
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