3 like 0 dislike
100 views
利用亂數產生器,搭配 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)
ID: 21951 - Available when: Unlimited - Due to: Unlimited

retagged by | 100 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.58.187
©2016-2024

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)
ID: 21957 - Available when: Unlimited - Due to: Unlimited
| 168 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)
ID: 21944 - Available when: Unlimited - Due to: Unlimited
| 125 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)
ID: 21943 - Available when: Unlimited - Due to: Unlimited
| 127 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)
ID: 21942 - Available when: Unlimited - Due to: Unlimited
| 110 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)
ID: 21941 - Available when: Unlimited - Due to: Unlimited
| 108 views
12,783 questions
183,443 answers
172,219 comments
4,824 users