1个回答
展开全部
VB6.0 新建一窗体,拖入一命令按钮。在代码窗口里粘贴以下代码即可:
Private Sub Command1_Click()
Dim I As Integer, J As Integer, K As Integer
For I = 1 To 9
For J = 1 To I
Print I;
Next J
Next I
End Sub
追问
不对 是
1
12
123
......
追答
改一下就行了。
Private Sub Command1_Click() Dim I As Integer, J As Integer, K As Integer For I = 1 To 9 For J = 1 To I Print J; Next J Print Next I End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询