用vb2010打印三角形的代码怎么写
1个回答
2018-05-02 · 知道合伙人互联网行家
关注
展开全部
Private Sub Command1_Click()
Dim i%, j%, n%
n = Val(InputBox("请枝态输入肢扒行数吧猛饥源! "))
For i = n To 1 Step -1
Print Tab(n + 1 - i);
For j = i * 2 - 1 To 1 Step -1
Print "*";
Next
Print
Next
End Sub
Dim i%, j%, n%
n = Val(InputBox("请枝态输入肢扒行数吧猛饥源! "))
For i = n To 1 Step -1
Print Tab(n + 1 - i);
For j = i * 2 - 1 To 1 Step -1
Print "*";
Next
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询