본문 바로가기
반응형

C언어24

[c언어]테트리스 게임 #include #include #include #include #include #include #pragma warning (disable : 4996) #define LEFT 75 #define RIGHT 77 #define UP 72 #define DOWN 80 #define ESC 27 #define BX 5 #define BY 1 #define BW 10 #define BH 20 void DrawScreen(); void DrawBoard(); BOOL ProcessKey(); void PrintBrick(BOOL Show); int GetAround(int x, int y, int b, int r); BOOL MoveDown(); void TestFull(); void PrintPreview(.. 2020. 4. 2.
[c언어] 슈팅게임 #include #include #include #include #include #include #pragma warning (disable : 4996) #define ESC 27 #define MAXENEMY 10 #define MAXBALL 20 int fx; int bx, by; int Score; void gotoxy(int x, int y) { COORD Pos = { x - 1, y - 1 }; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), Pos); } void CursorView(char show)//커서숨기기 { HANDLE hConsole; CONSOLE_CURSOR_INFO ConsoleCursor; hConsole = Get.. 2020. 4. 2.
[c언어]영화 예매 프로그램 #include #include #include #include #pragma warning (disable : 4996) // // // 1, 신의 한 수 : 귀수편 1관 // 2, 터미네이터 : 다크 페이트 2관 // 3, 좀비랜드 : 더블 탭 3관 // 4, 날씨의 아이 4관 // 5, 닥터 슬립 5관 // // 영화를 선택해 주세요. (999, 랜덤선택) : ? // // 몇명인지 입력해 주세요. (1인당 9,000원) : ? // // 시간을 선택해 주세요 : 1,(08:00) 2,(10:40) 3,(13:15) 4,(15:50) 5,(23:20) : ? // // --- 가격 계산 --- // // 당신이 선택한 영화는 "신의 한 수 : 귀수편" 1관 3명 27,00.. 2020. 4. 2.
[c언어] 음식추천 프로그램 #include #include #include #include #include #pragma warning (disable : 4996) int p_Set1 = 0; int p_Set2 = 0; char Menu[128] = { '\0' }; int R_Menu = 0; void Western()//양식 { R_Menu = rand() % 3;//랜덤값(0~2) if (R_Menu == 0) { strcat(Menu, "스테이크"); } else if (R_Menu == 1) { strcat(Menu, "파스타"); } else if (R_Menu == 2) { strcat(Menu, "피자"); } } void Chinese()//중식 { R_Menu = rand() % 3;//랜덤값(0~2) if .. 2020. 4. 2.
반응형