hi, I did not do well in the final but I feel that it was too hard with the limited time. anyway, I'm here to figure out how I could have done it.
this is the code, his explanation was for example if the input was 45000 then somehow in the program it would be like 45000=20000+20000+5000 then it would find the total after taxes for each then add them together. like 20000(0)+20000(0.1)+5000(0.2)= something. so my question is how I could make the program divide the input like that. one of my theories was to put the question in to make the person input his income over and over till the total reaches the limit but that would go against his explanation.
As you seem new around here: When posting code the editor helps you with the CODE-button which makes reading code easier. A moderator will correct this for you.
As for your question: Your explanation is very vague. It may help if you either give us the exact question you were given or at least re-phrase yours so it's more like an actual question instead of a vague summary. Don't get me wrong, but your problem may wasn't your coding skills but maybe to understand the question correctly in the first place to figure out what you were supposed to do.