[C語言]設計猜數字遊戲的程式

2008-01-10 4:50 am
設定為四位數,
若猜對數字而位置不對的有x個, 則提示xB;
若位置, 數字皆對的有y個, 則顯示yA.
(答案自行設定, ex:1357)

預設系統輸出:
請輸入四位數(0~9):1367
2A 1B
請輸入四位數(0~9):12233
請輸入四個不同的數字
請輸入四位數(0~9):1357
恭喜你猜中了!

回答 (1)

2008-01-10 7:42 pm
✔ 最佳答案
Yahoo formats program source code in a way that makes it difficult to read.
So follow the following link, and under programming, you will find the question and the answer in a text file called guessing.c.
http://mathmate.brinkster.net/
You can PM me if you have questions.


收錄日期: 2021-04-13 14:54:56
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080109000051KK03765

檢視 Wayback Machine 備份