Question: Question: use The following code with visual basic to add comments to everyline explaing what that particular line does. also explain what this program does.

Question: use The following code with visual basic to add comments to everyline explaing what that particular line does. also explain what this program does.

Public Class Main_Form

Dim Augend As Integer Dim Addend As Integer Dim Subtrahend As Integer Dim Minuend As Integer

Private Sub Main_Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Randomize()

Augend = CInt(Int((999 * Rnd()) + 1)) Addend = CInt(Int((999 * Rnd()) + 1)) Subtrahend = CInt(Int((999 * Rnd()) + 1)) Minuend = CInt(Int((999 * Rnd()) + 1))

lbl_Augend.Text = Augend lbl_Addend.Text = Addend lbl_Subtrahend.Text = Subtrahend lbl_Minuend.Text = Minuend

End Sub

Private Sub btn_Score_Click(sender As Object, e As EventArgs) Handles btn_Score.Click

Dim Sum As Integer Dim Difference As Integer

Dim Input_Sum As Integer Dim Input_Difference As Integer

Sum = Augend + Addend Difference = Subtrahend - Minuend

Input_Sum = Convert.ToInt32(txt_Sum.Text) Input_Difference = Convert.ToInt32(txt_Difference.Text)

If Input_Sum = Sum Then txt_Sum.ForeColor = Color.Black Else txt_Sum.ForeColor = Color.Red End If

If Input_Difference = Difference Then txt_Difference.ForeColor = Color.Black Else txt_Difference.ForeColor = Color.Red End If

End Sub

Private Sub btn_Close_Click(sender As Object, e As EventArgs) Handles btn_Close.Click Me.Close()

End Sub

End Class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!