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!

program.png

微信图片_20200302011413.png

微信图片_20200302011421.png

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.