1个回答
展开全部
rivate Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim d(5, 5) As Integer
For i = 1 To 5
For j = 1 To 5
If i = j Or i + j = 6 Then
d(i, j) = 1
Else
d(i, j) = 0
End If
Next j
Next i
For i = 1 To 5
For j = 1 To 5
Print d(i, j);
Next j
Print
Next i
End Sub
Dim i As Integer
Dim j As Integer
Dim d(5, 5) As Integer
For i = 1 To 5
For j = 1 To 5
If i = j Or i + j = 6 Then
d(i, j) = 1
Else
d(i, j) = 0
End If
Next j
Next i
For i = 1 To 5
For j = 1 To 5
Print d(i, j);
Next j
Next i
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询