Dim chessboard(7, 7) As Integer
For i = 0 To chessboard.GetUpperBound(0)
For j = 0 To chessboard.GetUpperBound(0)
If (i + j) mod 2 = Then
Console.out.Write(chessboard(i, j) = "B")
Else
Console.out.WriteLine(chessboard(i,j)="W")
End If
Next
Next
Console.in.ReadLine()
答案 0 :(得分:0)
因为你是新手......
Dim chessboard(7, 7) As String
For i As Integer = 0 To chessboard.GetUpperBound(0)
For j As Integer = 0 To chessboard.GetUpperBound(1)
If ((i + j) And 1) = 0 Then
chessboard(i, j) = "B"
Console.Write(chessboard(i, j))
Else
chessboard(i, j) = "W"
Console.Write(chessboard(i, j))
End If
Next
Console.WriteLine("")
Next