1个回答
展开全部
有意思,代码如下:
Private Sub Command1_Click()
'三角形
c = 1
For i = 1 To 10
Print Space(10 - i) & String(c, "*")
c = c + 2
Next
End Sub
Private Sub Command2_Click()
'菱形
i = 1
increase = 2
Do While i >= 1
Print Space((11 - i) / 2) & String(i, "*")
If i >= 10 Then increase = -2
i = i + increase
Loop
End Sub
Private Sub Command1_Click()
'三角形
c = 1
For i = 1 To 10
Print Space(10 - i) & String(c, "*")
c = c + 2
Next
End Sub
Private Sub Command2_Click()
'菱形
i = 1
increase = 2
Do While i >= 1
Print Space((11 - i) / 2) & String(i, "*")
If i >= 10 Then increase = -2
i = i + increase
Loop
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询