#include <stdio.h>
char DayOfWeek[6][5] = {"月","火","水","木","金","土"};
int main() {
int Month,Day;
int count;
printf("今、何月か半角数字で入力してください。\n"); printf("月曜日の日にちを半角数字で入力してください。\n");
printf("来週のシフトを提出させていただきます。\n");
for(int i=0;i<6;i++){
if(i==0){
printf("%d(%s) C\n",Day
,DayOfWeek
[i
]); }
else if(i==3){
printf("%d(%s) D\n",Day
,DayOfWeek
[i
]); }
else{
printf("%d(%s) なし\n",Day
,DayOfWeek
[i
]); }
if(Day>=28){
switch(Month){
case 2:
Day=1;
break;
case 4:
case 6:
case 9:
case 11:
if(Day==30){
Day=1;
}
else{
Day++;
}
break;
default:
if(Day==31){
Day=1;
}
else{
Day++;
}
break;
}
}
else{
Day++;}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpjaGFyIERheU9mV2Vla1s2XVs1XSA9IHsi5pyIIiwi54GrIiwi5rC0Iiwi5pyoIiwi6YeRIiwi5ZyfIn07CgppbnQgbWFpbigpIHsKICAgIGludCBNb250aCxEYXk7CiAgICBpbnQgY291bnQ7CiAgICBwcmludGYoIuS7iuOAgeS9leaciOOBi+WNiuinkuaVsOWtl+OBp+WFpeWKm+OBl+OBpuOBj+OBoOOBleOBhOOAglxuIik7CiAgICBzY2FuZigiJWQiLCZNb250aCk7CiAgICBwcmludGYoIuaciOabnOaXpeOBruaXpeOBq+OBoeOCkuWNiuinkuaVsOWtl+OBp+WFpeWKm+OBl+OBpuOBj+OBoOOBleOBhOOAglxuIik7CiAgICBzY2FuZigiJWQiLCZEYXkpOwogICAgCiAgICBwcmludGYoIuOBiueWsuOCjOanmOOBp+OBmeOAglxuIik7CiAgICBwcmludGYoIuadpemAseOBruOCt+ODleODiOOCkuaPkOWHuuOBleOBm+OBpuOBhOOBn+OBoOOBjeOBvuOBmeOAglxuIik7CgogIGZvcihpbnQgaT0wO2k8NjtpKyspewogICAgaWYoaT09MCl7CiAgICAJcHJpbnRmKCIlZCglcykgQ1xuIixEYXksRGF5T2ZXZWVrW2ldKTsKICAgIH0KICAgIGVsc2UgaWYoaT09Myl7CiAgICAJcHJpbnRmKCIlZCglcykgRFxuIixEYXksRGF5T2ZXZWVrW2ldKTsKICAgIH0KICAgIGVsc2V7CiAgICAJcHJpbnRmKCIlZCglcykg44Gq44GXXG4iLERheSxEYXlPZldlZWtbaV0pOwogICAgfQogICAgCiAgICBpZihEYXk+PTI4KXsKICAgICAgc3dpdGNoKE1vbnRoKXsKICAgICAgICBjYXNlIDI6CiAgICAgICAgICBEYXk9MTsKICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgNDoKICAgICAgICBjYXNlIDY6CiAgICAgICAgY2FzZSA5OgogICAgICAgIGNhc2UgMTE6CiAgICAgICAgICBpZihEYXk9PTMwKXsKICAgICAgICAgICAgRGF5PTE7CiAgICAgICAgICAgIH0KICAgICAgICAgIGVsc2V7CiAgICAgICAgICAgIERheSsrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICBpZihEYXk9PTMxKXsKICAgICAgICAgICAgRGF5PTE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZXsKICAgICAgICAgICAgRGF5Kys7ICAKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKICAgICAgfQogICAgfQogICAgZWxzZXsKICAgICAgICBEYXkrKzt9CiAgfQogIAogICAgcHJpbnRmKCLjgojjgo3jgZfjgY/jgYrpoZjjgYTjgYTjgZ/jgZfjgb7jgZnjgIJcbiIpOwogICAgcHJpbnRmKCLoj4Xph45cbiIpOwogICAgCn0KICA=