Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Problem 19 solution More...
#include <stdio.h>
Functions | |
char | get_month_days (short month) |
returns number of days in a month. More... | |
char | is_leap_year (short year) |
return 1 if input year is a leap year otherwise, return 0 | |
int | main (int argc, char **argv) |
Main function. | |
Problem 19 solution
char get_month_days | ( | short | month | ) |
returns number of days in a month.
Month is identified by an integer -
0 = Jan and 11 = December
For February, adjust for leap year outside the function.