Problem

Return days for month (non-leap): 1->31,2->28,4->30, etc simplified table 30 for 4,6,9,11.

Examples

  • daysInMonth(1) -> 31
  • daysInMonth(2) -> 28
  • daysInMonth(4) -> 30
Compile and test (Ctrl+Enter)