Code for the tip calculator