Examlex
Problems - Correcting Logic and Code Errors
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 = intPrizes(intX)
intWinners = 1
End If
End If
Next intX
lblHighest.Text = intHighPrize.ToString("C0")
lblWinners.Text = intWinners.ToString
End Sub
Internally
Pertaining to or situated within the interior or inside of something, often referring to operations or processes within an organization.
Whistle-Blowers
Individuals who expose wrongdoing, illegal activities, or unethical practices within an organization to the public or authorities.
Company Retaliation
Actions taken by an employer to punish or negatively impact an employee as a response to the employee's complaint or whistleblowing.
Q5: A variable that has _ scope can
Q6: The _ method ensures that any code
Q9: The minimum number of radio buttons in
Q19: Most invalid data is a result of
Q22: Describe two advantages to programmers of using
Q33: What do the TabIndex values determine for
Q35: You can include an identifying label on
Q36: When two or more methods have the
Q41: Write a Visual Basic statement that will
Q292: In a table, the first key is