Created function to calculate age based on user input.