1樓:夜遊神小翠
#include
#include
#include
void main()
while(guess != num);
printf("excellent ! you guessed the number!\n");
if(times < 10)
printf("either you know the secret or you got lucky!\n");
else if(times == 10)
printf("aha!you know the secret!\n");
else
printf("you should be able to be better!為什麼不在10次之內猜中他呢?\n");
printf("would you like to play again (y or n)?\n");
fflush(stdin);
scanf("%c",&choice);}}
vs2010下測試通過。
2樓:匿名使用者
給,已經編譯執行確認:
#include
#include
#include
void main()
else if(guessnum else printf("too high. try again.\n"); }}while(choose=='y'); getchar();} 3樓:顏小宅 已寫好,採納後立即傳送郵箱。 信譽第一。 include include int main void if x magic if x magic else return 0 static void main string args while i.trim equals 1 start random ra new random int rn... include include using namespace std void printchoice bool guessnumber int secret,int level else if iguess secret else if iguess secret cout only 3 tim... 您好,抄根據您 襲的bai問題,du 我已寫出zhi程式dao include int main else if a else if b printf d d d n p3,p2,p1 return 0 求大神幫編寫一個簡單的c語言程式,問題如下 include void input int a,i...編寫猜數的遊戲程式數字由機器隨機產生
用c 編寫猜數字的遊戲請高手指教要求電腦輸出隨機數字讓使用者來猜,程式提供選擇難度重新選擇的功能
求大神幫編寫簡單的c語言程式,問題如下