Create get_int_ref_checked()

Get integer input from keyboard. 

 If the input is negative or larger than 3999, 

 it will ask for keyboard input again. 

 Assumption: the input is always an integer. 

 Prompt: “Please enter a number n: 0 < n < 4000: “ 

 @param n: the integer input from keyboard.