Added boundary checking.

Added boundary checking to check if number is between 1 and 100.