야구게임
-
숫자 야구게임.GamePrograming/Create Game 2008. 11. 17. 12:19
#include #include #include int main(void) { int re; int strike, ball; int i,j,r, cnt=0; int ran[3], input_number[3]; bool flag[10] ={false}; srand(time(NULL)); do{ i=0; while(i < 3) { r=rand()%10; if(flag[r] == false){ flag[r] = true; ran[i] = r + 1; i++; } } cnt = 0; printf("\n답 : %d %d %d\n",ran[0],ran[1], ran[2]); //정답 printf("\n\n/////////////////// BASE BALL GAME!! ///////////////////\n"); ..