2006.1.9

 

Dim hw As Integer

Dim empid As String

Dim hr, gp, np, taxrate, taxamt As Single

empid = InputBox("Enter Employee ID")

While empid <> ""

hw = InputBox("Enter Hours Worked")

hr = InputBox("Enter Hourly Rate")

gp = hw * hr

If gp > 1000 Then

taxrate = 0.3

ElseIf gp > 800 Then

taxrate = 0.2

ElseIf gp > 500 Then

taxrate = 0.1

Else

taxrate = 0

End If

taxamt = gp * taxrate

np = gp - taxamt

MsgBox("Employee ID is " & empid)

MsgBox("Hours Worked is " & hw)

MsgBox("Hourly Rate is $" & hr)

MsgBox("Gross Pay is $" & gp)

MsgBox("Tax Rate is " & taxrate)

MsgBox("Tax Amounts are $" & taxamt)

MsgBox("Net Pay are $" & np)

empid = InputBox("Enter Employee ID")

End While

 

Hosted by www.Geocities.ws

1