Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim empid, hworked As Integer

Dim hrate, ovthrs, grosspay, ovtpay, regpay, trate1, trate2, trate3, netpay, taxpay, counter As Double

trate1 = 0.3

trate2 = 0.2

trate3 = 0.1

'counter = 5

'While (counter)

empid = TextBox1.Text

hworked = TextBox2.Text

hrate = TextBox3.Text

If (hworked > 40) Then

ovthrs = (hworked - 40)

ovtpay = (ovthrs * hrate * 1.5)

regpay = 40 * hrate

grosspay = regpay + ovtpay

Else

ovthrs = 0

ovtpay = 0

grosspay = hworked * hrate

End If

If (grosspay > 500) Then

taxpay = grosspay * trate1

netpay = grosspay - taxpay

ElseIf (grosspay > 300) Then

taxpay = grosspay * trate2

netpay = grosspay - taxpay

Else

taxpay = grosspay * trate3

netpay = grosspay - taxpay

End If

TextBox4.Text = netpay

'counter = counter - 1

'End While

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

TextBox1.Text = ""

TextBox2.Text = ""

TextBox3.Text = ""

TextBox4.Text = ""

End Sub

End Class

 

Hosted by www.Geocities.ws

1