I added a function for getting integer input and replaced several
user integer inputs with get_int.

get_int ensures that cin won't break if the user tries to input
something other than a number.