Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago