반응형 코드정리24 [C/C++] 야구게임 구현 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 #include #include int main() { int totalNum[9]; int targetNum[3]; srand((unsigned int)time(NULL)); for (int i = 0; i 2022. 9. 7. [C/C++] 로또 구현 (셔플 알고리즘) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #include #include int main() { int lotto[45]; srand((unsigned int)time(NULL)); for (int i = 0; i 2022. 9. 7. [C/C++] 별찍기 구현 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 #include int main() { int num; std::cin >> num; std::cout 2022. 9. 7. [C/C++] 가위바위보 게임 구현 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 #include #include int main() { enum RSP { RSP_R, RSP_S, RSP_P, RSP_END }; srand((unsigned int)time(NULL)); int player, npc; while (true) { std::cout 2022. 9. 7. 이전 1 ··· 3 4 5 6 다음 반응형