Resolved main() crashes when non-numerical inputs are provided.