#include #include #include #include // ÄܼÖâ ±ÛÀÚ¿¡ »ö ÀÔÈ÷±â #define col GetStdHandle(STD_OUTPUT_HANDLE) // ÄܼÖâÀÇ ÇÚµéÁ¤º¸¸¦ ¹Þ¾Æ¿É´Ï´Ù. #define WHITE SetConsoleTextAttribute(col, 0x000f) // Èò»ö #define YELLOW SetConsoleTextAttribute(col, 0x000e) // ³ë¶õ»ö #define PURPLE SetConsoleTextAttribute(col, 0x000d) // ÀÚÁÖ»ö #define RED SetConsoleTextAttribute(col, 0x000c) // »¡°£»ö #define SKY SetConsoleTextAttribute(col, 0x000b) // Çϴûö #define YELGREEN SetConsoleTextAttribute(col, 0x000a) // ¿¬µÎ»ö #define BLUE SetConsoleTextAttribute(col, 0x0009) // ÆĶõ»ö #define GOLD SetConsoleTextAttribute(col, 0x0006) // ±Ý»ö #define VIOLET SetConsoleTextAttribute(col, 0x0005) // º¸¶ó»ö #define BLOOD SetConsoleTextAttribute(col, 0x0004) // ÇÇ»ö #define BLUE_GREEN SetConsoleTextAttribute(col, 0x0003) // û³ì»ö #define GREEN SetConsoleTextAttribute(col, 0x0002) // ³ì»ö void gotoxy(int x, int y) { COORD Pos = { x - 1, y - 1 }; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), Pos); } void main(void) { system("cls"); gotoxy(5, 2); RED; printf("[5, 2]"); gotoxy(1, 5); YELLOW; printf("...................."); gotoxy(10, 10); PURPLE; printf("[10, 10]\n"); WHITE; gotoxy(20, 7); printf("¦£¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¤\n"); gotoxy(20, 8); printf("¦¢ »óÀÚ ±×¸®±â Å×½ºÆ® ¦¢\n"); gotoxy(20, 9); printf("¦¦¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¥\n"); gotoxy(20, 20); }