|
-
Feb 19th, 2000, 07:20 AM
#1
Thread Starter
Junior Member
My payroll calculator gives the wrong answer and i am pretty sure my code is right. It is supposed to give time and a half for hours worked over 40 but gives the wrong answer, it does give the right answer for hours under 40 though, here is the code: What's wrong? 
Dim inthours As Integer
Dim intrate As Integer
Dim intgross As Integer
inthours = txthours.Text
intrate = txtrate.Text
If inthours > 40 Then
intrate = intrate * 1.5
lblgross.Caption = inthours * intrate
ElseIf inthours <= 40 Then
intrate = intrate
lblgross.Caption = inthours * intrate
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|