UPDATED WITH A FULL TIP TABLE: I can always figure out the tip in my head for myself, however the real reason and need for a calculator (for me) has always been when we have a group of people and everyone wants to be fair. Once you enter your bill amount, the calculator will do a regular calculation (if you want) and present you with options for 10%, 15%, 18%, and 20%, all rounded UP to the nearest dollar. (I did this because I believe that rounding down is rather rude.)
However, if you want to split the bill, you can run the shortcut, enter your total bill, enter the number of people who will be splitting the bill, and it will present you with the same percentage options, slightly rounded to the nearest few cents (as you can see from the final bill amounts of different cents on the dollar). This will allow you quick access to a full tip amount, split as fairly as possible.
Nouveautés
Complete rewrite with tip tables and easy to view options.
Ce qu’il fait
58 actions-
Ask for InputHow much is the total bill?
-
Format Number
-
Number
-
Calculate
-
Round Number
-
Calculate
-
Format Number
-
Number
-
Calculate
-
Round Number
-
Calculate
-
Format Number
-
Number
-
Calculate
-
Round Number
-
Calculate
-
Format Number
-
Number
-
Calculate
-
Round Number
-
Calculate
-
Format Number
-
Choose from MenuAre you splitting this bill?
-
Choose from MenuNo
-
Show AlertHere are suggested tips:
-
Stop This Shortcut
-
Choose from MenuYes
-
Ask for InputHow many people will be splitting this bill?
-
Get Variable
-
Calculate
-
Round Number
-
Format Number
-
Get Variable
-
Calculate
-
Format Number
-
Get Variable
-
Calculate
-
Round Number
-
Format Number
-
Get Variable
-
Calculate
-
Format Number
-
Get Variable
-
Calculate
-
Round Number
-
Format Number
-
Get Variable
-
Calculate
-
Format Number
-
Get Variable
-
Calculate
-
Round Number
-
Format Number
-
Get Variable
-
Calculate
-
Format Number
-
Show AlertHere are suggested tips:
-
Stop This Shortcut
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#include 'actions/math'
#define color green
#define glyph dollarSign
const BillAmount = prompt("How much is the total bill?", "Number")
const FormattedBillAmount = formatNumber(0)
const Number = 0.1
const RoundedNumber10 = round(0)
const FormattedNumber10 = formatNumber(0)
const RoundedNumber15 = round(0)
const FormattedNumber15 = formatNumber(0)
const RoundedNumber18 = round(0)
const FormattedNumber18 = formatNumber(0)
const RoundedNumber20 = round(0)
const FormattedNumber20 = formatNumber(0)
menu "Are you splitting this bill?" {
item "No":
alert("Your total bill is: ${FormattedBillAmount}\n(All tips are rounded up.)\n\nA 10% tip is: ${RoundedNumber10}\nYour new total is: ${FormattedNumber10}\n\nA 15% tip is: ${RoundedNumber15}\nYour new total is: {FormattedNumber15}\n\nAn 18% tip is: ${RoundedNumber18}\nYour new total is: ${FormattedNumber18}\n\nA 20% tip is: ${RoundedNumber20}\nYour new total is: ${FormattedNumber20}", "Here are suggested tips:")
stop()
item "Yes":
const AskForInputSplit = prompt("How many people will be splitting this bill?", "Number")
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber10'.
round(0)
const FormattedNumberSplit10 = formatNumber(0, 2)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit10'.
const FormattedNumberSplit10V2 = formatNumber(0)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber15'.
round(0)
const FormattedNumberSplit15 = formatNumber(0)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit15'.
const FormattedNumberSplit15V2 = formatNumber(0)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber18'.
round(0)
const FormattedNumberSplit18 = formatNumber(0)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit18'.
const FormattedNumberSplit18V2 = formatNumber(0)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber20'.
round(0)
const FormattedNumberSplit20 = formatNumber(0)
// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit20'.
const FormattedNumberSplit20V2 = formatNumber(0)
}
alert("Your total bill is: ${FormattedBillAmount}\nYou will be splitting this bill {AskForInputSplit} ways.\n(All tips are rounded up.)\n\nA 10% tip is: ${RoundedNumber10}\nEach person pays: ${FormattedNumberSplit10}\nYour new total is: ${FormattedNumberSplit10V2}\n\nA 15% tip is: ${RoundedNumber15}\nEach person pays: ${FormattedNumberSplit15}\nYour new total is: ${FormattedNumberSplit15V2}\n\nAn 18% tip is: ${RoundedNumber18}\nEach person pays: ${FormattedNumberSplit18}\nYour new total is: ${FormattedNumberSplit18V2}\n\nA 20% tip is: ${RoundedNumber20}\nEach person pays: ${FormattedNumberSplit20}\nYour new total is: ${FormattedNumberSplit20V2}", "Here are suggested tips:")
stop()
Notes et avis
Écrire un avisAucun avis pour le moment. Sois le premier à partager ton avis !