I have a project I am working on and have hit a road block. This is what the program must accomplish:
The Windows application opens with a text box where the user enters their SSN and 4 seperate test scores. The program will calculate the average test score. Clear the entries to start over and an exit button.
'This code is executed when the user
' clicks the Calculate Score button. It
' calculate the average test score.
Dim strTestScore1 As String
Dim intTestScore1 As Single
Dim strTestScore2 As String
Dim intTestScore2 As Single
Dim strTestScore3 As String
Dim intTestScore3 As Single
Dim strTestScore4 As String
Dim intTestScore4 As Single
Dim strAvgTestScore As String
Dim decAvgTestScore As Decimal
strTestScore1 = Me.lblTestScore 1.Text
'intTestScore1 = Convert.ToInt32 (strTestScore1)
strTestScore2 = Me.lblTestScore 2.Text
'intTestScore2 = Convert.ToInt32 (strTestScore2)
strTestScore3 = Me.lblTestScore 3.Text
'intTestScore3 = Convert.ToInt32 (strTestScore3)
strTestScore4 = Me.lblTestScore 4.Text
'intTestScore4 = Convert.ToInt32 (strTestScore4)
decAvgTestScore = Convert.ToDecim al(decAvgTestSc ore)
decAvgTestScore = Math.Round(decA vgTestScore, 1)
decAvgTestScore = ((intTestScore1 + intTestScore2 + intTestScore3 + intTestScore4) \ 4)
Me.lblAvgTestSc ore.Text = Math.Round(decA vgTestScore, 1).ToString("F1 ")
The Windows application opens with a text box where the user enters their SSN and 4 seperate test scores. The program will calculate the average test score. Clear the entries to start over and an exit button.
'This code is executed when the user
' clicks the Calculate Score button. It
' calculate the average test score.
Dim strTestScore1 As String
Dim intTestScore1 As Single
Dim strTestScore2 As String
Dim intTestScore2 As Single
Dim strTestScore3 As String
Dim intTestScore3 As Single
Dim strTestScore4 As String
Dim intTestScore4 As Single
Dim strAvgTestScore As String
Dim decAvgTestScore As Decimal
strTestScore1 = Me.lblTestScore 1.Text
'intTestScore1 = Convert.ToInt32 (strTestScore1)
strTestScore2 = Me.lblTestScore 2.Text
'intTestScore2 = Convert.ToInt32 (strTestScore2)
strTestScore3 = Me.lblTestScore 3.Text
'intTestScore3 = Convert.ToInt32 (strTestScore3)
strTestScore4 = Me.lblTestScore 4.Text
'intTestScore4 = Convert.ToInt32 (strTestScore4)
decAvgTestScore = Convert.ToDecim al(decAvgTestSc ore)
decAvgTestScore = Math.Round(decA vgTestScore, 1)
decAvgTestScore = ((intTestScore1 + intTestScore2 + intTestScore3 + intTestScore4) \ 4)
Me.lblAvgTestSc ore.Text = Math.Round(decA vgTestScore, 1).ToString("F1 ")