Private Sub Command1 _C1ick()
For i = 0 To 3
For j = 0 To 3 - i
Print " ";
Next j
For k = 0 To 2 i + 1
Print "";
Next k
Next i
For i = 0 To 2
For j = 0 To i + 1
Print " ";
Next j
For k = 0 To 4 - 2 i
Print "";
Next k
Next i
End Sub
Private Sub Command1_Click()
n = CInt(InputBox("N="))
Print "N="; n
For i = 1 To n
If i > 1 Then Print Tab(n + 1 - i); "";
Print Tab(n - 1 + i); ""
Next i
For i = n - 1 To 1 Step -1
If i > 1 Then Print Tab(n + 1 - i); "";
Print Tab(n - 1 + i); ""
Next i
End Sub
Private Sub command1_click()
Dim i%, j%
For i = 1 To 5
Print Space(Abs(i - 3));
For j = 1 To 5 - 2 Abs(i - 3)
Print "";
Next j
Next i
End Sub
以上就是关于VB如何利用for循环打出星号菱形且可以通过text文档控制大小全部的内容,包括:VB如何利用for循环打出星号菱形且可以通过text文档控制大小、新手求助,vb用for循环输出一个由"*"符号组成的菱形图案求代码、vb 做出菱形来等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)