实现上述功能的VB程序如下,请回答下列问题:
Dim n As Integer
Dim L As String
Dim i as Integer
Dim j as Integer
Dim a(1 To 100) As Integer
Dim b(1 To 100) As Integer
Private Sub Command1_Click()
n = Val(Text1.Text)
Randomize
For i = 1 To n * n
a(i) = + 1
Next i
For i = 1 To n
L = ""
For j = 1 To n
L = L + " " + Str(a((i - 1) * n + j))
Next j
List1.AddItem L
Next i
End Sub
Private Sub Command2_Click()
List2.Clear
For i = 1 To n
L = ""
For j = 1 To n
b((i - 1) * n + j) =
L = L + " " + Str(b((i - 1) * n + j))
Next j
List2.AddItem L
Next i
For i = 1 To n * n
a(i) =
Next i
End Sub