Skip to content

Conversation

@ShivamVerma380
Copy link

First, check whether a given year is a leap year or not.

If a month is of 30 days then taking pills will continue to next month as there are no consecutive odd days.(i.e. 04,06,09,11)

If a month is of 31 days then taking pills will not continue to next month as there are consecutive odd days 31st and 1st .(i.e. 01,03,05,07,08,10,12)

In the case of February if it is of 28 days(i.e. nonleap year) it will continue to next month as there are no consecutive odd days. But for 29days February it will not continue to next month as there are consecutive odd days.

First, check whether a given year is a leap year or not.<br>
If a month is of 30 days then taking pills will continue to next month as there are no consecutive odd days.(i.e. 04,06,09,11)<br>
If a month is of 31 days then taking pills will not continue to next month as there are  consecutive odd days 31st and 1st .(i.e. 01,03,05,07,08,10,12)<br>
In the case of February if it is of 28 days(i.e. nonleap year) it will continue to next month as there are no consecutive odd days. But for 29days February it will not continue to next month as there are consecutive odd days.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants