English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

計概課,老師叫們寫一個怪怪的東西
如下
*
***
*****
*******
***
***
***
*****
不能用
print空空空*空空空
print空空***空空
print空*****空
print *******
............
(空:表空白鍵)
而且行數愈少愈好
幫忙
(因為知識加本身問題所以全部置左)
(做出來其實是類似↑)

2006-12-25 16:23:25 · 2 個解答 · 發問者 正鵠者 1 in 電腦與網際網路 程式設計

2 個解答

Private Sub Form_Load()
Form1.FontName = "細明體"
For i = 1 To 13 Step 2
  If i <= 7 Then
    Print Space(7 - i) & String(i, "*")
  Else
    Print Space(4) & String(3, "*")
  End If
Next i
Print Space(3) & String(5, "*")
End Sub

2006-12-26 03:05:59 · answer #1 · answered by 以晴 2 · 0 0

Private Sub Form_Load()
Dim i As Integer, a(8) As Integer
a(0) = 1: a(1) = 2: a(2) = 3: a(3) = 4: a(4) = 2: a(5) = 2: a(6) = 2: a(7) = 3

Form1.FontName = "細明體"
For i = 0 To 7
Print Space(4 - a(i)) & String(2 * a(i) - 1, "*")
Next i

End Sub

2006-12-26 09:34:19 · answer #2 · answered by JJ 7 · 0 0

fedest.com, questions and answers