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 | 39 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.68.65.138
©2016-2020

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
| 61 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
| 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
| 35 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
| 22 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
| 25 views
9,615 questions
94,666 answers
76,330 comments
2,931 users