Write a VB.NET program to accept a number from the user through an input box and display its multiplication table in a list box.

Answer:

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a As Integer
        a = TextBox1.Text
        For i = 1 To 10
            ListBox1.Items.Add(a * i)
        Next
    End Sub
End Class
Scroll to Top