如下情况: 1
222
33333
4444444
33333
222
1
不好意思是这个没显示好!~不是靠开头显示的~! 是前面也有空格的~! 等腰三角形那样~!然后下面也是个等腰三角形~!
VB中用循环语句 for 。。next 怎么实现数字金字塔》?
Dim I As Long, nStr As String, S As Long S = 4 '显示的最大数字,可修改 Me.Cls: Me.AutoRedraw = True For I = 1 To S nStr = String(S - I, " ") & String((I - 1) * 2 + 1, I & "")Me.Print nStr Next For I = S - 1 To 1 Step -1 nStr = String...
VB代码,数字金字塔
Next i End Sub