The question and my solution are attached. I do not know how to correct it. I hope someone can show me a correct and complete answer. Thanks!
You are obviously expected to do some simple validation on the day number - it needs to be > 0 and <= (number of days in that month).
You need to design some suitable if tests and insert them after line 2.
If you get stuck come back here and explain what you have done so far and someone wil help.