Check the value of n and if it is greater than 20, inform the user and ask for a new number.

Regards,
Jim