Calculates the tip based on user-determined percentage and displays the tip and total amounts.