这个求行和列和怎么编?怎么编?
关于VB的一个问题!急!
- 提问者网友:低吟詩仙的傷
- 2021-06-04 17:06
- 五星知识达人网友:过活
- 2021-06-04 17:16
Private Sub Command1_Click()
Dim a(4, 5) As Single
For i = 0 To 3
For j = 0 To 4
a(i, j) = Int(Rnd() * 10)
Text1.Text = Text1.Text & a(i, j) & " "
Next j
Text1.Text = Text1.Text & vbCrLf & vbCrLf
Next i
Text2.Text = a(0, 0) + a(0, 1) + a(0, 2) + a(0, 3) + a(0, 4) & vbCrLf & vbCrLf & a(1, 0) + a(1, 1) + a(1, 2) + a(1, 3) + a(1, 4) & vbCrLf & vbCrLf & a(2, 0) + a(2, 1) + a(2, 2) + a(2, 3) + a(2, 4) & vbCrLf & vbCrLf & a(3, 0) + a(3, 1) + a(3, 2) + a(3, 3) + a(3, 4)
Text3.Text = a(0, 0) + a(1, 0) + a(2, 0) + a(3, 0) + a(4, 0) & " " & a(0, 1) + a(1, 1) + a(2, 1) + a(3, 1) + a(4, 1) & " " & a(0, 2) + a(1, 2) + a(2, 2) + a(3, 2) + a(4, 2) & " " & a(0, 3) + a(1, 3) + a(2, 3) + a(3, 3) + a(4, 3) & " " & a(0, 4) + a(1, 4) + a(2, 4) + a(3, 4) + a(4, 4)
End Sub
生成--求和代码都在里边。清除和结束不难,相信你会,你自个儿调一下。
- 1楼网友:末日狂欢
- 2021-06-04 19:55
- 2楼网友:千杯敬自由
- 2021-06-04 18:47