I'm trying to create a monthly budget and inside I have a function that completes what tax bracket they are in. For some reason .10 is being multiplied by their monthly income, Can you look at my code and see why it's doing that? And how I can actually get accurate results for their actual tax bracket.
Nevermind. You cannot chain logical expressions like you would in math. (0 <= yearlyIncome < 15100) would be computed like so:
lets say yearlyIncome = 20000
It first checks if yearlyIncome is bigger or equal to 0. That will return true/1. Then it checks if 1 is smaller than 15100, which it always is.
EDIT:
The correct way would be: if(yearlyIncome >= 0 && yearlyIncome < 15100)