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 | #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #define SIZE 100 struct QUESTION { char question[SIZE]; char item1[SIZE]; char item2[SIZE]; char item3[SIZE]; char item4[SIZE]; int solution; }; struct QUESTION bank[100] = { {"ÀÓº£µðµå ÀåÄ¡¿¡ °¡Àå ÀûÇÕÇÑ ÇÁ·Î±×·¡¹Ö ¾ð¾î´Â?", "1. Python", "2. Java", "3. C", "4. Javascript", 3 }, {"¼·Î ´Ù¸¥ ÀÚ·áÇüÀ» ¸ðÀ» ¼ö ÀÖ´Â ±¸Á¶´Â?", "1. ¹è¿", "2. º¯¼ö", "3. ±¸Á¶Ã¼", "4. Æ÷ÀÎÅÍ", 3 }, }; int main(void) { int select, i; for (i = 0; i < 2; i++) { printf("%s\n", bank[i].question); printf("%s ", bank[i].item1); printf("%s ", bank[i].item2); printf("%s ", bank[i].item3); printf("%s ", bank[i].item4); scanf("%d", &select); if (select == bank[i].solution) printf("¸Â¾Ò½À´Ï´Ù.\n\n"); else printf("Ʋ·È½À´Ï´Ù.\n\n"); } return 0; } | cs |