VB中如何输入绘制以下图形
展开全部
'两个种方式:
Private Sub Command1_Click()
Print "* *"
Print " * *"
Print " * *"
Print " *"
Print " * *"
Print " * *"
End Sub
Private Sub Command2_Click()
Dim i As Integer
Const L = 4 '这个参数可以改变图形大小
For i = 0 To L
Print Space(i) & "*" & Space(L + 1 - i) & Space(L - i) & "*"
Next
Print Space(i) & "*"
For i = L To 1 Step -1
Print Space(i) & "*" & Space(L + 1 - i) & Space(L - i) & "*"
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询