Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決 
Visual Basic程式計算問題
Mar 6th 2015, 10:04

X = 0   ; 將 0設定給 X這個變數

;這是一個迴圈初值 -8 終值 20 每次回圈i遞增 3
(也就是說迴圈第一次 i 是 -8 迴圈第二次 i 是(上次的i 加上遞增值) -8 + 3 ......迴圈第三次(上次的i 加上遞增值) -5 +3 .. 一直到 i 超過終值 20 結束此迴圈)

//迴圈開始  
For I = -8 To 20 Step 3
X = X +I ;將i 直列累加 存於變數中..
Nest I
// 迴圈結束

Print X ;將 x 值顯示

在執行回圈時 i分別為 -8,-5,-2,1,4,7,10,13,16,19 ,將這幾個值相加既為55

以上回答...希望你看得懂 ..

參考資料 自修,書籍,

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    kkoki0httzobg 發表在 痞客邦 留言(0) 人氣()