24h購物| | PChome| 登入
2007-10-03 18:28:19| 人氣146| 回應0 | 上一篇 | 下一篇

第一次段考-四種圖形*

推薦 0 收藏 0 轉貼0 訂閱站台

第一次段考題目

---------------拎杯是分隔線----------------------------------
1.直角位於左下

Dim x As Integer

Private Sub Command1_Click()


For I = 1 To x

For j = 1 To I

Print "囧";

Next j
Print
Next I

End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()

x = Val(InputBox("妳要多少囧"))

End Sub


---------------拎杯是分隔線----------------------------------

2.直角位於左上

Dim x As Integer

Private Sub Command1_Click()


For i = 1 To x
For j = 1 To x + 1 - i

Print "囧";

Next j
Print
Next i

End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()

x = Val(InputBox("妳要多少囧"))

End Sub



---------------拎杯是分隔線----------------------------------

3.直角位於右下

Dim x As Integer

Private Sub Command1_Click()


For i = 1 To x
Print Space((x - i) * 4);
For j = 1 To i

Print "囧";

Next j
Print
Next i

End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()

x = Val(InputBox("妳要多少囧"))

End Sub




---------------拎杯是分隔線----------------------------------

4.直角位於右上

Dim x As Integer

Private Sub Command1_Click()


For I = 1 To x
Print Space((I - 1) * 4);
For j = 1 To x + 1 - I

Print "囧";

Next j
Print
Next I

End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()

x = Val(InputBox("妳要多少囧"))

End Sub

台長: 笨小龍€
人氣(146) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 興趣嗜好(收藏、園藝、棋奕、汽機車) | 個人分類: 程式語言-VB程式碼* |

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文