Wesley80 0 Newbie Poster

this windows application finds the amount of your pay if your pay is doubled each day, starting with a penny a day or a nickel a day. Instead of one month's salary, a boss offers her new employees a penny the first day and experienced employees a nickel the first day under a new pay system. Each day the pay will double.
Restriction: The minimum number of days for the pay period is 19 days for the new employees and 16 days for the experienced. The maximum number of days in a pay period is 22 days.

Could someone help me I can not find the pay.

Here is my code:

Option Strict On

Public Class fmrDoubleYourPay

    Private Sub BtnNumberOfDaysAndFirstDayPay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnNumberOfDaysAndFirstDayPay.Click
        ' Declation section
        Dim strNumberOfDays As String
        Dim intNumberOfDays As Integer
        Dim decFirstDayPay As Decimal
        Dim decPenny As Decimal = 0.01D
        Dim decNickel As Decimal = 0.05D
        Dim decTotalOfPay As Decimal = 0D
        Dim strInputBoxMessage As String = " Enter Number of days Worked "
        Dim strInputBoxHeading As String = " Double Your Pay "
        Dim strNormalBoxMessage As String = " Enter Number of days Worked "
        Dim strNonNumericErrorMessage As String = " Error - Enter Number of days Worked "
        Dim strNegativeNumberErrorMessage As String = " Error - Enter Number of days worked "

        ' Declare and initialize loop variables

        Dim strCancelButtonClicked As String = ""
        Dim intMaximumNumberOfDays As Integer = 22


        strNumberOfDays = InputBox(strInputBoxMessage, strInputBoxHeading)

        If IsNumeric(strNumberOfDays) Then
            intNumberOfDays = Convert.ToInt32(strNumberOfDays)
            If intNumberOfDays > 0 Then
                If Me.radPenny.Checked Then
                    decFirstDayPay = decPenny
                ElseIf Me.radNickel.Checked Then
                    decFirstDayPay = decNickel
                End If
                If intNumberOfDays > 1 Then
                    Me.lstDisplay.Items.Add(decFirstDayPay)
                    decTotalOfPay += decFirstDayPay
                    strInputBoxMessage = strNormalBoxMessage
                Else
                    strInputBoxMessage = strNegativeNumberErrorMessage
                End If
            Else
                strInputBoxMessage = strNonNumericErrorMessage
            End If

            For intNumberOfDays = 1 To intMaximumNumberOfDays
                If intNumberOfDays = 1 Then
                    decTotalOfPay = decFirstDayPay
                Else
                    decTotalOfPay = decFirstDayPay * intNumberOfDays
                End If

            Next
            ' Make label visible
            Me.lblTotalPayDisplay.Visible = True
            Me.lblTotalPayDisplay.Text = " Total Pay is " & decTotalOfPay.ToString("C")


        End If




    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.