l NAME: • 6 •Period 'Title: Determine better pay 'Due: Pri ate Sub cmdEnd Click(} End End Sub Pri ate Sub cmdRun 'Declare ariables Dim Sall As Double 'constant pay rate Dim Sal2 As Double 'changing pay rate Dim index As Single 'loop ariable •calculate first payrate Sall - lOO * 10 second pay rate •calculate Sal2 - 0 For index Sal2 To 0 9 + index 2 Next index Sal2 'Output salaries lblOutOne - FormatCurrency(Sall, 2) lblOutTwo - FormatCurrency(Sal2, 2) 'Determine better salary > If Sall Sal2 Then lblOutThree - ..Method One... End Sub Else lblOutThree End If "Method Two""
l • NAME: •Period 6 'Title: Determine better pay 'Due: Pri ate Sub cmdEnd Click(} End End Sub Pri ate Sub cmdRun 'Declare Dim Sall ariables As Double 'constant pay rate Dim Sal2 As Double Dim index As Single 'changing pay rate 'loop ariable •calculate Sall - lOO first payrate * 10 •calculate second pay rate Sal2 - 0 For index Sal2 Next index 0 To 9 Sal2 + 2 index 'Output salaries lblOutOne - FormatCurrency(Sall, 2) lblOutTwo - FormatCurrency(Sal2, 2) 'Determine better salary If Sall > Sal2 Then lblOutThree - ..Method One... Else lblOutThree End If End Sub "Method Two""
MTH517%20Introduction%20to%20Computer%20Programming%20in%20C%20and%20Apps%20Development%20R%201-24-13.docx