定义一个包含4行5列的二维数组并用[60,100]的随机整数对数组进行赋值,然后将
1个回答
展开全部
您好,您试试:
Private Sub Command1_Click()
Dim a(20) As Integer, b(4, 5) As Integer
Randomize
For i = 1 To 20
a(i) = Int(Rnd * 91) + 10
Print a(i);
If i Mod 5 = 0 Then Print
Next
Print
For i = 1 To 4
For j = 1 To 5
b(i, j) = a(j + (i - 1) * 5)
Print b(i, j);
Next
Print
Next
End Sub
Private Sub Command1_Click()
Dim a(20) As Integer, b(4, 5) As Integer
Randomize
For i = 1 To 20
a(i) = Int(Rnd * 91) + 10
Print a(i);
If i Mod 5 = 0 Then Print
Next
For i = 1 To 4
For j = 1 To 5
b(i, j) = a(j + (i - 1) * 5)
Print b(i, j);
Next
Next
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询