tax code of 1913

closed account (NUfLy60M)
Hello guys!
Living in Virginia and going to school I took a cplusplus course. I was wondering if anyone could help me with creating a code for asking the user for their annual gross salary based off of the tax code

Thanks for all help
start with some code, we need something to work off of. Once you give it a try we can help you further.

Tip: use code tags when posting your code
closed account (NUfLy60M)
Sorry i meant to put the code i had so far

// Project 1- Oct 6
// Mr. Kelley
// Bre'ana Briddell
// Date: 10/13/12

#include <iostream>
#include <iomanip>

{
// declare variables
double taxationAmount = 0.0;
double grossSalary = 0.0;

// income tax collected
case taxationAmount < 50,000
case taxationAmount 50,000

// processing
taxationAmount = grossSalary;

// display the results
int cout << "Your Annual Gross Salary is: $" << grossPay << endl;
return 0;

} // End of Main Function


But felt like i was doing it all wrong
hellosunshine wrote"
But felt like i was doing it all wrong


I'm sorry to be harsh, but you ARE doing it all wrong.

3 glaring errors I see are:

1) There is no int main(); line that is essential to start the main section.

2) On your cout line you have an undeclared variable called grossPay. I am sure you mean grossSalary.

3) You don't have a means for the user to input a value for grossSalary (nor taxationAmount). As it stands now, its value will always be 0.0.

You need to think through what your teacher is asking you to do. Most of that thinking is best done with pen and paper.
Last edited on
closed account (NUfLy60M)
@nathan10
I pretty much figured that

When I copied my code it did not add the int main (); in there the way I had it so I did have that

also yes I did mean to put grossSalary

finally that is true. I suppose i was trying to finde a way to calculate the grossSalary by the tax code of 1913 and that is all that I was given which consists of 1 percent on the first $50,000
2 percent on the amount over $50,00 up to $75,000
3 percent on the amount over $75,00 up to $100,000
4 percent on the amount over $100,000 up to $250,000
5 percent on the amount over $250,000 up to $500,000
6 percent on the amount over $500,000
which i looked this tax code up and asked my teacher and that was correct but thats the only info I received
Topic archived. No new replies allowed.