vb程序设计输出倒序三角形
2个回答
展开全部
很简单,看代码:
Private Sub Form1_l
Load
Dim a As Integer
Dim b As Integer
a=Val(Inputbox(“请输入行数”,‘’倒序三角形‘’))
For i =1 To a
Print Tab(i+8);
For j=1 To 11-2*i
Print “*”;
Next j
Print
Next i
End Sub
Private Sub Form1_l
Load
Dim a As Integer
Dim b As Integer
a=Val(Inputbox(“请输入行数”,‘’倒序三角形‘’))
For i =1 To a
Print Tab(i+8);
For j=1 To 11-2*i
Print “*”;
Next j
Next i
End Sub
追答
很简单,看代码:
Private Sub Form1_l
Load()
Dim a As Integer
Dim b As Integer
a=Val(Inputbox(“请输入行数”,‘’倒序三角形‘’))
For i =1 To a
Print Tab(i+8);
For j=1 To 11-2*i
Print “*”;
Next j
Next i
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询