如何用VB编写一个由"*"组成的倒三角形 ********* ******* ***** *** *
展开全部
Private Sub Command1_Click()
For i = 5 To 1 Step -1
Print Space(10 -i);
For j = 2 * i - 1 To 1 Step -1
Print "*";
Next j
Print
Next i
End Sub
For i = 5 To 1 Step -1
Print Space(10 -i);
For j = 2 * i - 1 To 1 Step -1
Print "*";
Next j
Next i
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Click()
Dim i, j As Integer
For i = 5 To 1 Step -1
For j = 1 To 6 - i
Print " ";
Next j
For j = 1 To 2 * i - 1
Print "*";
Next j
Print
Next i
End Sub
Dim i, j As Integer
For i = 5 To 1 Step -1
For j = 1 To 6 - i
Print " ";
Next j
For j = 1 To 2 * i - 1
Print "*";
Next j
Next i
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Click()
For i = 1 To 6
Print Tab(12 + i);
For j = 1 To 12 - (2 * i - 1)
Print "*";
Next j
Next i
For i = 1 To 6
Print Tab(12 + i);
For j = 1 To 12 - (2 * i - 1)
Print "*";
Next j
Next i
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询