you should check whether the number is between 1 &12 for the month.
if yes,only then go for entering and checking the day between 1 and 31;else ask him to enter between 1 and 12.
after that check for the range in which month falls and print the message.
|