exercise 19: functions and parameters
take user inputs