3 like 0 dislike
利用亂數產生器,搭配 while 的無窮迴圈,隨機產生介於 1 到 100 之間的亂數,利用 try/catch 來檢測 while 所產生的亂數,當產生的數值為 11 的倍數時,就丟出 "取得11的倍數",當產生的數值為 17 的倍數,則丟出所產生的數字,並在 catch 函式顯示相對應的訊息內容。

 

參考書籍:旗標無痛學習教本
[Normal] Essay (Open question) - asked in Introduction to Computer Programming I (C) by (20.9k points)
Available when: Unlimited - Due to: Unlimited

retagged by | 19 views
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.63.143
©2016-2019

Related questions

4 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 34 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 19 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 7 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 6 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 14 views
9,252 questions
85,810 answers
63,644 comments
2,720 users