Essay
The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
-Private Sub btnGetHighest_Click(ByVal sender As Object,ByVal e As System.EventArgs)Handles btnGetHighest.Click
' displays the highest prize amount and the
' number of people who won that amount
Dim intPrizes(10)As Integer = {50,25,100,25,100,
25,75,50,40,60}
Dim intHighSub As Integer = intPrizes.GetHighest()
Dim intHighPrize As Integer = intPrizes(0)
Dim intWinners As Integer = 1
For intX As Integer = 1 To intHighSub
If intPrizes(intX)= intHighPrize Then
intWinners *= 1
Else
If intPrizes(intX)< intHighPrize Then
intHighPrize = intPrizes(intX)
intWinners = 1
End If
End If
Next intX
lblHighest.Text = intHighPrize.ToString("C0")
lblWinners.Text = intWinners.ToString
End Sub
Correct Answer:

Verified
Private Sub btnGetHighest_Click(ByVal se...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q21: Assigning initial values to an array is
Q22: Write the statement to declare a
Q23: Based on the statement below,which of the
Q24: When an array is sorted in descending
Q25: The statement _ assigns the string "Paris"
Q27: Write the statements to traverse the strCategory
Q28: How do the elements in parallel one-dimensional
Q29: Case 1 - Tony’s Pizza & Pasta<br>The
Q30: If a one-dimensional array contains five elements,its
Q31: The following statement will declare an array.What