76 245
Assignments Done
Successfully Done
In May 2019

Answer to Question #20862 in Visual Basic for mohammad

Question #20862
design a vb form, the user will enter a number & then click the button, the result should display in list box the multiplication table of your number (by the numbers 1 to 10)...
what is the code for this question??
Expert's answer
Public Class Form1

Private Sub txtUpperlimit_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtUpperlimit.TextChanged


End Sub

''' <summary>

''' Calculate button

''' </summary>

''' <param name="sender"></param>

''' <param name="e"></param>

''' <remarks></remarks>

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCalculate.Click


Dim counter As Integer = 1


resultListBox.Items.Add("N" + vbTab + "N^2" + vbTab +

Do Until counter > Integer.Parse(txtUpperlimit.Text)

resultListBox.Items.Add(counter.ToString() + vbTab + Math.Pow(counter,
2).ToString() + vbTab + Math.Pow(counter, 3).ToString())

counter += 1


Catch ex As Exception

MessageBox.Show("Incorrect data")

End Try

End Sub

End Class

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions