Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,382 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,046 people online right now. Registration is fast and FREE... Join Now!




Sales Tax Program - Sequential Logic

 
Reply to this topicStart new topic

Sales Tax Program - Sequential Logic

csstarter9
21 Sep, 2006 - 06:11 AM
Post #1

New D.I.C Head
*

Joined: 18 Sep, 2006
Posts: 21


My Contributions
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?
CODE

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 Sep, 2006 - 12:11 PM
User is offlineProfile CardPM
+Quote Post

Amadeus
RE: Sales Tax Program - Sequential Logic
21 Sep, 2006 - 06:17 AM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,230



Thanked: 40 times
Dream Kudos: 25
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

csstarter9
RE: Sales Tax Program - Sequential Logic
21 Sep, 2006 - 12:08 PM
Post #3

New D.I.C Head
*

Joined: 18 Sep, 2006
Posts: 21


My Contributions
QUOTE(Amadeus @ 21 Sep, 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.


Yeah i know i was trying to see if i was off to the right start or not
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/5/08 01:47AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month