This C# playground demonstrates a simple sales tax calculation module that hasn't been tested yet, Can you find the errors and fix the code before it's used by customers?
Golly, what is wrong with my sales tax calculator?
public class SalesTaxCalculatorStub
public static decimal GetTotalAmount(decimal itemPrice, decimal taxRatePercent)
decimal taxRate = taxRatePercent / 10 ; //fix me
return itemPrice + (itemPrice * taxRatePercent); //what?
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.