主题:求助 新手LOOP 問題
小第正在學VB 有個問題想大大們指教一下
我想做出一個
*
**
***
****
*****
的效果
但我的CODE 出來的是
*****
可以指教一下嗎
我的CODE :
Dim i As Integer = 1
Dim j As Integer = 0
Dim msg As String = ""
For i = 1 To 5 Step 1
Do
msg &= "*"
j += 1
Loop Until j = i
Next
msg &= vbNewLine
MsgBox(msg)
我想做出一個
*
**
***
****
*****
的效果
但我的CODE 出來的是
*****
可以指教一下嗎
我的CODE :
Dim i As Integer = 1
Dim j As Integer = 0
Dim msg As String = ""
For i = 1 To 5 Step 1
Do
msg &= "*"
j += 1
Loop Until j = i
Next
msg &= vbNewLine
MsgBox(msg)