Write VB program to find multiplication table using dynamic array

Write VB program to find multiplication table using dynamic array

Private Sub Command1_Click()

Dim A() As Integer

Dim N As Integer

Dim K As Integer

N = InputBox("Enter a Number")

K = InputBox("Enter Upto What Print")

ReDimA(K)

For I = 1 To K

A(I) = N * I

Next I

For I = 1 To K

    Print N & " * " & I & " = " &A(I)

Next I

End Sub


Comments