Given what we've learned so far, the shortest way to write this code is to have IF / ELSE IF conditions for each of the months that do NOT have 31 days, and then use the "ELSE" clause to handle all the 31-day months (which is the most common). That way you don't need to have 12 conditional statements!
(However, if you want to look ahead to Chapter 5 in the textbook, you'll find that you can shorten your code some more by using OR statements... but that's not necessary.)