Implementation of read input feature #18 (reading integer from console)