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

 

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

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

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
| 240 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: 21951 - Available when: Unlimited - Due to: Unlimited
| 220 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
| 218 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
| 172 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
| 167 views
15,033 questions
243,242 answers
215,948 comments
5,696 users