Skip to content

A calculator that can be used to calculate tips at a restaurant, bar etc.

Notifications You must be signed in to change notification settings

WxProg/tip-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Tip Calculator

Instructions

If the bill was $150.00, split between 5 people, with 12% tip.

Each person should pay (150.00 / 5) * 1.12 = 33.6

Format the result to 2 decimal places = 33.60

Thus everyone's share of the total bill is $30.00 plus a $3.60 tip.

Tip: There are 2 ways to round a number. You might have to do some Googling to solve this.💪

Example Input

Welcome to the tip calculator!
What was the total bill? $124.56
How much tip would you like to give? 10, 12, or 15? 12
How many people to split the bill? 7

Example Output

Each person should pay: $19.93

About

A calculator that can be used to calculate tips at a restaurant, bar etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages