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 sum As Double
- sum = CDbl(TextBox1.Text)
- If sum > 0 Then
- Dim tip As Double
- tip = sum * 0.1
- TextBox2.Text = CStr(tip)
- Else
- MessageBox.Show("Invalid Input")
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement