3 like 0 dislike
242 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 | 242 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.59.165
©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
| 296 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
| 224 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
| 268 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
| 250 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
| 243 views
12,783 questions
183,443 answers
172,219 comments
4,824 users