# Sales Tax Program - Sequential Logic

Page 1 of 1

## 2 Replies - 5441 Views - Last Post: 21 September 2006 - 01:08 PMRate Topic: 1 Votes //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=18815&amp;s=0f10df23424d96d2db02333ace7db4ab&md5check=' + ipb.vars['secure_hash'], cur_rating: 1, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 csstarter9

Reputation: 1
• Posts: 21
• Joined: 18-September 06

# Sales Tax Program - Sequential Logic

Posted 21 September 2006 - 07:11 AM

I'm trying to write a small code that will ask the user to choose between Orange county or Seminole county sales tax calculation.
- The user will also have the option to quit the program. (You can use 1, 2, and 3 respectively).
- If the incorrect choice is typed, display an error message and prompt the user to re-enter a choice.
- If the user selects one of the two counties, the program should prompt the user to enter the price of the item.
- The program must then calculate the sales tax according to the following:
- Orange county tax is 6.5%.
- Seminole county tax is 7.0%.
- Finally, the program must output the price, tax, and total amount.
- The process must continue until the user enters the option to quit the program.

Here is a bit of my code but i don't know what to do next:
am i off to the right start or what?
```using namespace std;
int main()
{
bool done;
int num1;
int num2;
int userChoice;
bool finished;
do
{
cout << "Enter <1> if you want to start over ";
cin >> userChoice;
if (userChoice == 1)
{
finished = true;
}
else
{
finished = false;
}
}
done = false;
cout << " Enter Orange county or Seminole county ";
while (done == false)
{
cin >> num1;
cin >> num2;

done = false;
cout << " Incorrect. Please try again. ";
}

}
while (finished == false);
return 0;
```

This post has been edited by csstarter9: 21 September 2006 - 01:11 PM

Is This A Good Question/Topic? 0

## Replies To: Sales Tax Program - Sequential Logic

• g+ + -o drink whiskey.cpp

Reputation: 247
• Posts: 13,505
• Joined: 12-July 02

## Re: Sales Tax Program - Sequential Logic

Posted 21 September 2006 - 07:17 AM

I hate to mention it, but with the exception of asking about the counties, this is your previous program about asking the user for integers, and multiplying them together. Have you tried modifying the program?

You'll need variables to store the values for the tax rates, and a variable to store the user input for the county, and a variable to store the user input for the price.

### #3 csstarter9

Reputation: 1
• Posts: 21
• Joined: 18-September 06

## Re: Sales Tax Program - Sequential Logic

Posted 21 September 2006 - 01:08 PM

Amadeus, on 21 Sep, 2006 - 07:17 AM, said:

I hate to mention it, but with the exception of asking about the counties, this is your previous program about asking the user for integers, and multiplying them together. Have you tried modifying the program?

You'll need variables to store the values for the tax rates, and a variable to store the user input for the county, and a variable to store the user input for the price.

Yeah i know i was trying to see if i was off to the right start or not