이건 추가. char brush = '*'; 부분 바꾸면 됨ㅋㅋ


#include <stdio.h> #define WIDTH 80 int storeArray(int[][WIDTH], int, char); typedef struct alphabet {     char text;     int width;     int pixel; }alphabet; const alphabet alphabetList[26] = { {'a', 4, 0x699f99}, {'b', 4, 0xe9e99e}, {'c', 4, 0x698896}, {'d', 4, 0xe9999e}, {'e', 4, 0xf8e88f}, {'f', 4, 0xf8e888},                                     {'g', 4, 0x698b96}, {'h', 4, 0x99f999}, {'i', 3, 0x3a497}, {'j', 4, 0x111996}, {'k', 4, 0x9aca99}, {'l', 4, 0x88888f},                                     {'m', 5, 0x23bac631}, {'n', 4, 0x99db99}, {'o', 4, 0x699996}, {'p', 4, 0xe99e88}, {'q', 5, 0x19294a4f}, {'r', 4, 0xe99e99},                                     {'s', 4, 0x694296}, {'t', 5, 0x3e421084}, {'u', 4, 0x99999f}, {'v', 4, 0x999996}, {'w', 5, 0x2318d6aa}, {'x', 4, 0x996999},                                     {'y', 5, 0x23151084}, {'z', 4, 0xf1248f}}; int main() {     char brush = '*';     char text = 0;     int offset = 0;     while (text != EOF) {         int buffer[6][WIDTH] = { 0, };         while (1) {             if (!text)                 text = getchar();             if (text == '\n') {                 offset = 0;                 text = 0;                 break;             }             offset = storeArray(buffer, offset, text);             if(offset != -1)                 text = 0;             else {                 offset = 0;                 break;             }         }         for (int i = 0; i < 6; i++) {             for (int j = 0; j < WIDTH; j++) {                 if (buffer[i][j])                     printf("%c", brush);                 else                     printf(" ");             }             printf("\n");         }     } } int storeArray(int arr[][WIDTH], int offset, char text) {     alphabet alpha;     if (text < 'a')         text += 32;     if (text != ' ')         alpha = alphabetList[text - 'a'];     else         alpha.width = 0;     int newOffset = offset + alpha.width + 1;     if (newOffset <= WIDTH) {         for (int i = 0; i < 6; i++) {             for (int j = 1; j <= alpha.width; j++) {                 arr[5 - i][newOffset - j - 1] = alpha.pixel & 0x1;                 alpha.pixel >>= 1;             }         }         return newOffset;     }     else         return -1; } }

자고일어나니 누가 먼저 해놨던데

언어 다르니까 아무튼ㅇㅇ

숫자나 문장부호는 귀찮아서 안넣음


스페이스바 관련사항 수정