Private Sub Form_Activate()
Call pict
End Sub
Public Sub pict()
Dim i As Integer, j As Integer
For i = 1 To 9
Print Tab(12 - i);
For j = 1 To 2 * i - 1
If i Mod 2 = 0 Then
If j Mod 2 = 0 Then
Print " ";
Else
Print Chr(49 + i - 1);
End If
Else
If j Mod 2 = 0 Then
Print " ";
Else
Print Chr(65 + i - 1);
End If
End If
Next j
Next i
End Sub
Option Explicit
Private Sub Form_Activate()
Call pict
End Sub
Public Sub pict()
Dim i As Integer, j As Integer
For i = 1 To 9
Print Tab(12 - i);
For j = 1 To 2 * i - 1
If j Mod 2 = 0 Then
Print " ";
Else
If i Mod 2 = 0 Then
Print CStr(i);
Else
Print Chr(65 + i - 1);
End If
End If
Next j
Next i
End Sub
效果:
Private Sub Form_Activate()
Call pict
End Sub
Public Sub pict()
Dim i As Integer, j As Integer
Dim n As Integer
For i = 1 To 9
Print Tab(12 - i);
For j = 1 To 2 * i - 1
If j Mod 2 = 1 Then
If i Mod 2 = 1 Then
Print Chr(65 + i - 1);
Else
Print CStr(i);
End If
Else
Print " ";
End If
Next j
Print
Next i
End Sub
你这个只有字母没有数字的