C programming question: what formula can i use to convert an input number of days into months and days?
32 --> outputs 2, 1 (feb 1)
60 --> outputs 3, 1 (march 1, assuming non-leap year)
how can i at least figure out which month would a given number of days correspond to?
it would be much simpler if each month only had 30 days; it would just be months = days/30. but, in this case, im taking into account that some months have 31 days, some 30, and then 28 for february (non-leap year). how can i achieve this?