求VB二维数组print format()语句格式输出的例子,在线等。比如有值P(I,J)为40

求VB二维数组print format()语句格式输出的例子,在线等。比如有值P(I,J)为40乘40的数组,I,J分别为1到41,每个输出的P(I,J)保留小数点后5位,相邻两个P(I,J)之间相隔4个字符

Private Sub Command1_Click()
Dim i As Integer, j As Integer
Dim pi(40, 40) As single
For i = 1 To 40
For j = 1 To 40
pi(i, j) = 10 * Rnd
Next
Next

For i = 1 To 40
For j = 1 To 40
Print Format(pi(i, j), "0.00000"+space(4));
Next
Print
Next

End Sub
温馨提示:答案为网友推荐,仅供参考
相似回答
大家正在搜