Does anyone know how to do this homework question

A country collects taxes on the assessment of value of property, which is 80% of the property’s actual value. If an acre of land is valued at $100,000, its assessment value is $80,000. There are federal and state property tax. The federal property tax rate is 0.5%. The federal property tax for the acre assess is then $400. The state property tax rate varies state by state. The user enters the state property tax rate between 0.1% and 0.5%. Write a program that
• asks for the actual value of a piece of property and state property tax rate between 0.1% and 0.5% and
• displays the actual value, the assessment value, federal and state tax rates, and the total property tax.

yes.

Give it a try, and ask a specific question.
closed account (3vX4LyTq)
I do! :D

jared
Okay then. Can you tell me how to make the user enter the state tax between 0.001 and 0.005?
Do my HW for me!
closed account (48T7M4Gy)
Do my HW for me!

OK, the HW team is now working on it for you but we are having a few problems. How do you get the program to ask a question eg actual value. Do you just put a question mark instead of endl?
I know we need variables but is there a percent data type?
for input you just need a loop:

1
2
3
4
5
6
double Tax = 0.0;
bool BadInput = true;
do{
cin >> Tax;
if (Tax>0.001 && Tax<0.005){BadInput = false;}
}while(BadInput);
I got it guys. Thanks for the help. I was just kidding about doing it for me :p
or you could read a more friendly to type value (borrowing from the above)

double tax = 0;
int percent;

bool BadInput = true;
do{
cin >> percent;
if (percent > 0 && percent <6){BadInput = false;}
}while(BadInput);

tax = percent/100.0;
Topic archived. No new replies allowed.