Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim num1 As Double
- Dim num2 As Double
- Dim result As Double
- Dim op As String
- num1 = TextBox1.Text
- num2 = TextBox2.Text
- op = ComboBox1.Text
- If op = "+" Then
- result = num1 + num2
- ElseIf op = "-" Then
- result = num1 - num2
- ElseIf op = "*" Then
- result = num1 * num2
- ElseIf op = "/" Then
- result = num1 / num2
- End If
- TextBox3.Text = result
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement