[정올] Language Coder_반복제어문1_자가진단6_code633 (C)
두비니
·2020. 3. 16. 02:12
#include <stdio.h>
int main() {
int a;
while (1) {
printf("1. Korea\n2. USA\n3. Japan\n4. China\nnumber? ");
scanf("%d", &a);
switch (a) {
case 1:
printf("\nSeoul\n\n");
break;
case 2:
printf("\nWashington\n\n");
break;
case 3:
printf("\nTokyo\n\n");
break;
case 4:
printf("\nBeijing\n\n");
break;
default:
printf("\nnone\n\n");
return 0;
}
}
}
'Coding_Algorithm > 정올 문제풀이' 카테고리의 다른 글
[정올] Language Coder_반복제어문2_자가진단1_code541 (C) (0) | 2020.03.18 |
---|---|
[정올] Language Coder_반복제어문1_형성평가5_code129 (C) (0) | 2020.03.17 |
[정올] Language Coder_반복제어문1_자가진단5_code540 (C/Python) (0) | 2020.03.15 |
[정올] Language Coder_반복제어문1_자가진단4_code539 (C) (0) | 2020.03.14 |
[정올] Language Coder_반복제어문1_자가진단3_code538 (C) (0) | 2020.03.13 |