31 lines
666 B
C
31 lines
666 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int month;
|
|
printf("월(Month) 입력 : ");
|
|
scanf("%d", &month);
|
|
|
|
switch (month) {
|
|
case 1:
|
|
case 3:
|
|
case 5:
|
|
case 7:
|
|
case 8:
|
|
case 10:
|
|
case 12:
|
|
printf("%d월은 31일까지 있습니다", month);
|
|
break;
|
|
case 4:
|
|
case 6:
|
|
case 9:
|
|
case 11:
|
|
printf("%d월은 30일까지 있습니다", month);
|
|
break;
|
|
case 2:
|
|
printf("%d월은 28일까지 있습니다", month);
|
|
break;
|
|
default:
|
|
printf("잘못된 월입니다.");
|
|
break;
|
|
}
|
|
}
|