Name: Anonymous 2009-03-19 20:52
alright so for my begining c++ class i have to create a program that taxes certain incomes a certain amount depending on how much they make
anyways i just have a problem for the highest level which i need to do the following for over 5000.01 income the tax rate is 1% for the first $3000 + 5% for the next $1000 + 7% of the next 1000 + 1% for every $1000 over $5000
so basically i have this
if (income >= 5000.01)
{
taxMod = income - 5000.00;
overTax = ??? need help here!
taxes = (3000.00 * .01) + (1000.00 * .05) + (1000.00 * .07) + overTax;
}
so i need to make overTax get rid of any excess above the last thousand and then tax 1% of every thousand, the thing is I have no idea how to do that
anyways i just have a problem for the highest level which i need to do the following for over 5000.01 income the tax rate is 1% for the first $3000 + 5% for the next $1000 + 7% of the next 1000 + 1% for every $1000 over $5000
so basically i have this
if (income >= 5000.01)
{
taxMod = income - 5000.00;
overTax = ??? need help here!
taxes = (3000.00 * .01) + (1000.00 * .05) + (1000.00 * .07) + overTax;
}
so i need to make overTax get rid of any excess above the last thousand and then tax 1% of every thousand, the thing is I have no idea how to do that