Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion exercises/ex4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ int main()

switch (month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
printf("31 days\n");
break;

case 4:
case 6:
case 9:
case 11:
printf("30 days\n");
break;

case 2:
printf("28/29 days\n");
break;

default:
printf("Invalid input! Please enter month number between 1-12");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not bad 👍


/*switch (month)
{
case 1:
printf("31 days");
break;
Expand Down Expand Up @@ -50,7 +77,7 @@ int main()
break;
default:
printf("Invalid input! Please enter month number between 1-12");
}
}*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

il codice commentato si può cancellare


return 0;
}