#include <stdio.h>
int main (void)
{
int anno;
int mese;
int giorni;
anno = 2013;
mese = 2;
switch (mese)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
giorni = 31;
break;
case 4:
case 6:
case 9:
case 11:
giorni = 30;
break;
case 2:
if (((anno % 4 == 0) && !(anno % 100 == 0))
|| (anno % 400 == 0))
{
giorni = 29;
}
else
{
giorni = 28;
}
break;
}
printf ("Il mese %d dell'anno %d ha %d giorni.\n", mese, anno, giorni);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluICh2b2lkKQp7CiAgICBpbnQgYW5ubzsKICAgIGludCBtZXNlOwogICAgaW50IGdpb3JuaTsKICAgIGFubm8gPSAyMDEzOwogICAgbWVzZSA9IDI7CgogICAgc3dpdGNoIChtZXNlKQogICAgICB7CiAgICAgICAgY2FzZSAxOgogICAgICAgIGNhc2UgMzoKICAgICAgICBjYXNlIDU6CiAgICAgICAgY2FzZSA3OgogICAgICAgIGNhc2UgODoKICAgICAgICBjYXNlIDEwOgogICAgICAgIGNhc2UgMTI6CiAgICAgICAgICAgIGdpb3JuaSA9IDMxOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlIDQ6CiAgICAgICAgY2FzZSA2OgogICAgICAgIGNhc2UgOToKICAgICAgICBjYXNlIDExOgogICAgICAgICAgICBnaW9ybmkgPSAzMDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAyOgogICAgICAgICAgICBpZiAoKChhbm5vICUgNCA9PSAwKSAmJiAhKGFubm8gJSAxMDAgPT0gMCkpCiAgICAgICAgICAgICAgICB8fCAoYW5ubyAlIDQwMCA9PSAwKSkKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBnaW9ybmkgPSAyOTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBnaW9ybmkgPSAyODsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIGJyZWFrOwogICAgICB9CiAgICBwcmludGYgKCJJbCBtZXNlICVkIGRlbGwnYW5ubyAlZCBoYSAlZCBnaW9ybmkuXG4iLAogICAgICAgICAgICBtZXNlLCBhbm5vLCBnaW9ybmkpOwogICAgZ2V0Y2hhciAoKTsKICAgIHJldHVybiAwOwp9