Middle Middle Sinister Dexter Sinister L 2. Math Tutor Application math problem
ID: 3790540 • Letter: M
Question
Middle Middle Sinister Dexter Sinister L 2. Math Tutor Application math problem in a Label control Create an application that displays a simple math problem. It sho form should have a button that displays the answer to the in Figure 2- have that closes the application. The leftmost screen answer shows the application's form before the button is clicked to display the clicked screen shows the applic form after the button has been re 2-98 The Math Tutor application Math Tutor Math Tutor 18 64 82 18 64 Show Answer Show AnswerExplanation / Answer
Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim sum As Integer Dim a As Integer Dim b As Integer Visible = True If value.Text = "" Then Visible = False MessageBox.Show("Sorry cannot be empty.") Focus() End If a = Val b = Val sum = (a + b) Text = "The sum of " & a & " and " & b & " is " & sum & "." End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Visible = False End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Text = "" Text = "" Text = "" Focus() End Sub End Class