Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form3
- Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- 'Created by Aminpro
- 'Written by Aminpro
- 'LoL
- 'Do not steal!
- 'Seriously?
- If IsNumeric(TextBox1.Text) And IsNumeric(TextBox2.Text) Then
- '_____________Declarations_________________
- Dim x As Double
- Dim y As Double
- Dim Op As String 'Created by Aminpro
- x = CInt(TextBox1.Text)
- y = CInt(TextBox2.Text)
- Op = operatorbox.SelectedItem 'Created by Aminpro
- '___________End Declarations_______________
- 'If operations starts----------------
- If Op = "+" Then
- ans.Text = x + y
- End If 'Created by Aminpro
- If Op = "-" Then
- ans.Text = x - y
- End If 'Created by Aminpro
- If Op = "*" Then
- ans.Text = x * y
- End If 'Created by Aminpro
- If Op = "/" Then
- ans.Text = x / y
- End If 'Created by Aminpro
- If Op = "^" Then
- ans.Text = x ^ y
- End If 'Created by Aminpro'Created by Aminpro
- Else
- ans.Text = "Only intergers are accepted!"
- End If
- 'If operations ends------------------
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement