3 like 0 dislike
設計一個 CGuessing 類別,提供 Generate 函式,產生目前電腦的出拳情形(剪刀、石頭、布)。Judge 函式以引數接收使用者的輸入,可以判斷目前的輸贏,傳回值為 1 時表示電腦已經贏三次,傳回值為 -1 時表示玩家已經贏三次,0 表示目前尚未有任何一方贏超過三次。Show 函式則是顯示本次電腦與玩家的出拳情形以及玩家與電腦各自贏的次數。以 CGuessing 類別為基礎設計一個猜拳遊戲。

 

參考書籍:旗標無痛學習教本
[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.111
©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
| 33 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,213 questions
83,544 answers
60,783 comments
2,671 users