请用VB的循环语句打印出如下图形: A B C D E F G H I J K L M N O P
2个回答
展开全部
Private Sub Command3_Click()
For i = 1 To 4
For j = 1 To 4 - i
Print " ";
Next
For k = 1 To i * 2 - 1
a = a + 1
Print Chr(64 + a);
Next
Next
End Sub
如果觉得字符太密:
Private Sub Command3_Click()
For i = 1 To 4
For j = 1 To 4 - i
Print " ";
Next
For k = 1 To i * 2 - 1
a = a + 1
Print Chr(64 + a) & " ";
Next
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询