Should work. PS: it's 1 AM, and I hope there aren't any logical mistakes.
EDIT: as it is, the program is prone to errors. What happens if the user enters a non-valid month, like 100? Or a non-valid day, like -1, or 394? You should check for valid user input first.

One of the fun and challenging things about programming is that there are usually many different ways to code to get the same results.

At DIC, you may see many different things, and some code, you may wish you didn't.

So ... be forewarned ... double - check all code you see ... by testing it out to see if it gives the desired output with all possible inputs ... and if it meets with the 'style standards' you may need or desire.