如何在VB下用FOR循環語句打印出一個倒三角形?
Private Sub Command1_Click()Dim i As Long, j As LongDim strTemp As String, strXing As String FOR i = 0 To 3 strXing = "" For j = 1 To (7 - Abs(i) * 2) strXing = strXing & "*" Next strTemp = Space(Abs(i)) & strXing & Space(Abs(i)) Print strTemp Next End Sub