Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim total As Integer
total = 120 * Val(TextBox1.Text) + 150 * Val(TextBox2.Text) + 180 * Val(TextBox3.Text)
If RadioButton1.Checked Then
total = total * 0.9
ElseIf RadioButton2.Checked Then
total = total * 0.85
ElseIf RadioButton3.Checked Then
total = total * 0.8
End If
Label6.Text = total
End Sub
End Class
沒有留言:
張貼留言