The tip is the money given as a gift for good service, to the person who serves you in a restaurant. In this project, a simple tip calculator is made which takes billing amount, type of service, and a number of persons as input. As per the three inputs it generates a tip for the serving person.
To find out the tip we will take input from the user: Bill Amount (it is the amount of the total bill, we are taking this into amount variable), for the type of service we are using a drop-down menu having quality as the options in percentage (like good, bad, excellent, etc.), lastly, we are taking the number of persons as input (it will help to divide the tip equally among all the person). A per the inputs from the user, we are calculating the tip and then printing it using the console.log() function.
Total is basically amount multiplied by type of service divided by a number of persons.
Using HTML we are giving desired structure, option for the input, and submit button. With the help of CSS, we are beautifying our structure by giving colors and desired font, etc.