The original US income tax of 1913 was quite simple The tax
Solution
#include<iostream>
using namespace std;
int main()
{
double amt, per;
//Loops till 0.0 is entered as amount
do
{
cout<<\"\ Enter yearly income amount (0.0 to quit): \";
cin>>amt;
//Checks less than or equal to 50000
if(amt <= 50000)
per = amt * .01;
//Checks between 50000 and 75000
else if (amt <= 75000)
per = (50000 * .01) + (amt - 50000) * .02;
//Checks between 75000 and 100000
else if(amt <= 100000)
per = (50000 * .01) + (25000 * .02) + (amt - 75000) * .03;
//Checks between 100000 and 250000
else if(amt <= 250000)
per = (50000 * .01) + (25000 * .02) + (25000 * .03) + (amt - (100000)) * .04;
//Checks between 250000 and 500000
else if(amt <= 500000)
per = (50000 * .01) + (25000 * .02) + (25000 * .03) + (150000 * .04) + (amt - (250000)) * .05;
//Above 500000
else
per = (50000 * .01) + (25000 * .02) + (25000 * .03) + (150000 * .04) + (250000 * .05) + (amt - (500000)) * .06;
//If amount is not 0.0 then display the percent
if(amt != 0.0)
cout<<\"\ The U.S. 1913 income tax = $\"<<per;
}while(amt != 0.0);
cout<<\"\ Process completed ...\";
}
Output:
Enter yearly income amount (0.0 to quit): 45000
The U.S. 1913 income tax = $450
Enter yearly income amount (0.0 to quit): 53275.98
The U.S. 1913 income tax = $565.52
Enter yearly income amount (0.0 to quit): 132500
The U.S. 1913 income tax = $3050
Enter yearly income amount (0.0 to quit): 382000
The U.S. 1913 income tax = $14350
Enter yearly income amount (0.0 to quit): 1000000
The U.S. 1913 income tax = $50250
Enter yearly income amount (0.0 to quit): 0.0

