Re: [問題] C語言猜數字問題

看板C_and_CPP (C/C++)作者 (隨便殺)時間16年前 (2009/06/21 14:12), 編輯推噓1(105)
留言6則, 5人參與, 最新討論串1/2 (看更多)
do{ ←1 srand((unsigned)time(NULL)); for(i=0;i<10;i++) t[i]=-1; do { ←2 s=rand()%9; if(s==t[s]) continue; else { d[r]=s; r++; t[s]=s; }while(r<=3); ← else後面接while?? s=0; do { ←3 b=0; a=0; n=0; printf("Enter your Guess: (Press Ctrl+c to exit)\n"); s++; scanf("%1d%1d%1d%1d",&g[0],&g[1],&g[2],&g[3]); for(i=0;i<4;i++) { if(isdigit(g[i])!=0) { printf("Please Enter Digit\n") continue; } } 1,2,3總共少了三個 "}" 我覺得你根本是沒有用心在檢察 最基本的"{}"都可以少這麼多個 還有 你有三個do 但是後面呢?do what??do you?do something? 另外 你排版也太亂了點 這樣不太有人會想幫你看= = -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.39.100 ※ 編輯: sosokill 來自: 140.129.39.100 (06/21 14:12) ※ 編輯: sosokill 來自: 140.129.39.100 (06/21 14:14)

06/21 14:21, , 1F
有你幫他看 他就足夠了阿 @@"
06/21 14:21, 1F

06/21 14:24, , 2F
我功力低微 只能看這種簡單的 Orz
06/21 14:24, 2F

06/21 14:24, , 3F
不過他程式碼內容我沒有很認真看= =
06/21 14:24, 3F

06/21 14:31, , 4F
看到排版就跳過去了...
06/21 14:31, 4F

06/21 15:31, , 5F
我請他好好排版 可是被修推文
06/21 15:31, 5F

06/21 19:16, , 6F
抱歉抱歉,我可能會刪除重發.....排的好看一點
06/21 19:16, 6F
文章代碼(AID): #1AFSyzYP (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #1AFSyzYP (C_and_CPP)