Finding correct tax bracket with iteration
Hello!
What I want to do is find if
--- higher than low and equal to high, if so, return the full sum
--- higher than low, but lower than high, if so subtract low from
--- lower than low, ignore the bracket
I'v tried all day with for loops, if...else statements, but I don't understand what to use to calculate all of those three conditions ...
taxBracket is finding the tax payed for each step of the tax bracket (stepOne, stepTwo, etc ...)What I want to do is find if
myIncome is:--- higher than low and equal to high, if so, return the full sum
--- higher than low, but lower than high, if so subtract low from
myIncome and multiply with tax to find a new sum--- lower than low, ignore the bracket
I'v tried all day with for loops, if...else statements, but I don't understand what to use to calculate all of those three conditions ...
