/ Published in: C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
int days_in_month(int month) { const int days[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; switch (month) { case 1: break; case 2: break; case 3: break; case 4: break; case 5: break; case 6: break; case 7: break; case 8: break; case 9: break; case 10: break; case 11: break; case 12: break; default: break; } // end switch return days[month]; } // end days_in_month
Comments
