Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

need halp

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

Name: Anonymous 2009-03-19 20:55

Try getting of tax.

Name: Anonymous 2009-03-19 21:01

I would help you but I don't believe in the progressive tax system.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List