← all problems

totalWithTip 🌶️🌶️

Write a method that takes two int parameters, billCents (a bill amount, in cents) and tipPercent (a tip percentage, like 20 for 20%), and returns the total cost in cents: the bill plus that percentage of the bill as a tip. For example, totalWithTip(1000, 20) should return 1200, since a 20% tip on 1000 cents is 200 cents, and 1000 + 200 is 1200.