Advertisement
Genryuu

haha

Jun 7th, 2023
790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  3.         Dim num1 As Double
  4.         Dim num2 As Double
  5.         Dim result As Double
  6.         Dim op As String
  7.  
  8.         num1 = TextBox1.Text
  9.         num2 = TextBox2.Text
  10.         op = ComboBox1.Text
  11.  
  12.         If op = "+" Then
  13.             result = num1 + num2
  14.         ElseIf op = "-" Then
  15.             result = num1 - num2
  16.         ElseIf op = "*" Then
  17.             result = num1 * num2
  18.         ElseIf op = "/" Then
  19.             result = num1 / num2
  20.         End If
  21.  
  22.         TextBox3.Text = result
  23.     End Sub
  24. End Class
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement