编程论坛
注册
登录
编程论坛
→
VB.NET论坛
输出一个5行的左上三角形
jinlby
发布于 2008-01-02 21:48, 1141 次点击
用编写
最后在左上角显示
12345
1234
123
12
1
谢谢,帮帮我
1 回复
#2
fairy4
2008-01-03 08:34
Dim temp, strTemp As String
Dim x, i As Integer
For x = 5 To 1 Step -1
temp = ""
For i = 1 To x
temp = temp & i
Next
strTemp = strTemp & temp & vbCrLf
Next
Me.Label1.Text = strTemp
label1的textalivgn 設置為:MiddleLeft
1