下面題目原為VB6上的練習題,若要在 VB2008上執行必須先宣告參數及把print改為debug.print 1 s = 0 For i = 1 To 10 s = s + i Next i Print s 輸出結果為 (A) 55, (B) 110, (C) 155, (D) 45 解答:A 2 s = 0 For I = 1 To 10 s = s + I Next I Print I 輸出結果為 (A) 10, (B) 9, (C) 11, (D) 12 解答:C 3 s = 0 For I = 1 To 9 Step 2 If I <> 9 Then Print I; "+"; Else Print I; "="; End If s = s + I Next I Print s 輸出結果為 (A) 1+3+5+7=16, (B) 1+3+5+7+9=25, (C) 1+3+5+7+9+10=35, (D) 2+4+6+8+10=25 解答: B 4 s = 0 For I = 2 To 20 Step 10 s = s + I Next I Print s 輸出結果為 (A) 14, (B) 24, (C) 34, (D) 44 解答: A 5 s = 0 For I = 2 To 20 Step 10 s = s + I Next I Print I 輸出結果為 (A) 2, (B) 12, (C) 22, (D) 32 解答: C 6 for i = 1 to 6 s = s + 1 next I j = s + I print j 輸出結果為 (A) 28, (B) 21, (C) 27, (D) 15 解答:A 7 for i = 1 to 3 for j = 1 to 2 s =s + 1 next j next I print s 輸出結果為 (A) 5, (B) 6, (C) 7, (D) 8 解答: B 8 for i = 1 to 3 for j = 1 to 2 s =s + I next j next I print s 輸出結果為 (A) 11, (B) 12, (C) 13, (D) 14 解答: B 9 for i = 1 to 3 for j = 1 to 2 s =s + j next j next I print s 輸出結果為 (A) 7, (B) 8, (C) 9, (D) 10 解答: C 10 for i = 1 to 2 for j = i to 3 s =s + j next j next i print s 輸出結果為 (A) 9, (B) 10, (C) 11, (D) 12 解答: C 11 for i = 1 to 2 for j = i to 3 s =s + i next j next i print s 輸出結果為 (A) 6, (B) 7, (C) 8, (D) 9 解答: B 12 i = 1 while i <= 10 i = i + 1 wend print i 輸出結果為 (A) 10, (B) 11, (C) 12, (D) 13 解答:B 13 i = 1 while i <= 6 s = s + i i = i + 1 wend print s 輸出結果為 (A) 18, (B) 19, (C) 20, (D) 21 解答: D 14 i = 1 while i < 6 s = s + i i = i + 1 wend print s 輸出結果為 (A) 14, (B) 15, (C) 16, (D) 17 解答: B 參考資料:http://www.gotop.com.tw/waweb2004/main/home.aspx?pg=HM010X2007&bn=AEQ003100
標籤雲
visual basic 2008
(157)
訊息分享
(111)
Visual Studio 2008
(64)
wpf
(37)
每日一句
(35)
cpp
(30)
python
(26)
Silverlight
(22)
C++
(18)
Network Security
(15)
全國技藝競竇
(14)
好文分享
(11)
.Net
(10)
Blogger
(10)
名詞解釋
(10)
研討會
(10)
Excel
(9)
書籍介紹
(9)
每日一小品
(9)
電腦黑白講
(8)
Visual Studio 201X
(7)
分享
(7)
網頁設計
(7)
CSS
(5)
Algorithm
(4)
Network
(3)
PHP
(3)
Access
(2)
SA
(2)
VB.Net
(2)
VBA
(2)
WireShark
(2)
Word
(2)
php html
(2)
其他好東東
(2)
分類整理
(2)
Asp.Net
(1)
Batch
(1)
Blockly
(1)
IT News
(1)
OpenAI
(1)
SE
(1)
W7
(1)
Writer
(1)
app inv2
(1)
dfs
(1)
vex vr sample
(1)
影像處理練習
(1)
黑白講
(1)
2008年4月19日 星期六
迴路入門練習題目
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言