exception handling added to main.

adding exception handling to input.  Input is parsed to double and
checked for success.  If parsing fails, user is prompted to try again.