00:01
For this problem, you're asked to write a program that will ask a user to input a month, and then we'll display the number of days in that month.
00:13
So we're going to first ask for a month in year by using e -vow input, enter a month in a year.
00:22
If the month is equal to one, we want to print that january of that year, has 31 days, and so on for all of the months, except for february, because if month is equal to two, then it is a february, and we need to determine if it is a leap year or not.
00:42
So we'll determine is leap year by saying that year modulo 4 is equal to zero and year modular 100 is not equal to zero.
00:54
That will be our truth case, or year modulo 400 is equal to zero.
01:00
So if any of those things are true, if either of those things are true, then it is a leap year and we'll print that february of that year has 29 days.
01:11
Otherwise, we'll print that february of that year has 28 days.
01:14
So let's try a couple of options.
01:17
How about january of 2013? january 2013 has 31 days...