VB 随机生成一个n*n矩阵,元素0~9,将生成矩阵转置,分别显示在两个文本框中

2024-11-29 19:12:51
推荐回答(1个)
回答1:

Private Sub Command1_Click()
Cls
Randomize: x = Fix(Rnd * 10): Randomize: y = Fix(Rnd * 10)
For i = 0 To x
For j = 0 To y
Print "*";
Next
Print
Next
End Sub