Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

benlangdon

macrumors 65816
Original poster
Jan 13, 2008
1,497
0
so i am supposed to write a flowchart for

(exact question)
draw a flowchart for a program that will compute and output the sales tax due with a tax rate of 7% and the total purchase price of 4 items. also perform a desk check with the following values 2.99, 3.99, 7.50 and 2.75.

i am supposed to use selection and repetition.

i am just stuck on if i

input price of item
then
running total = price of item + running total
then what do you put to make it go back and how do you write it so that the running total gets moved back up to the top.

(my brain hurts i just keep seeing it going into a loop. how do you make it stop, like only go for 4 items
 

ipo

macrumors member
Sep 6, 2007
97
0
Wtf !?

draw a flowchart for a program that will compute and output the sales tax due with a tax rate of 7% and the total purchase price of 4 items.
i am supposed to use selection and repetition.
running total = price of item + running total
then what do you put to make it go back and how do you write it so that the running total gets moved back up to the top.

?! Better create some variables ?? I'm trying to figure out what exactly is the problem and.. i fail. Store , what you could ever need to run some procedures or clear some functions in a different variable so you could always refer to them later ??? i hope , there's the answer for you !?
:confused:
 

benlangdon

macrumors 65816
Original poster
Jan 13, 2008
1,497
0
so here it is as simple as i can get it

draw a flowchart for a program that will compute and output the sales tax due with a tax rate of 7% and the total purchase price of 4 items. also perform a desk check with the following values 2.99, 3.99, 7.50 and 2.75.

so what i would have if it wasn't selection and repetition.

/input; item 1 (I1)
/input; item 2 (I2)
/input; item 3 ..
/input;item 4 ..
[Item total (IT) = I1+I2+I3+I4]
[TT (total tax)=IT * .07]
/output; TT
[Total Price (TP) = TT+IT
/output;TP

to be honest i have no clue what your saying. and saying ex." item total " that is saying that "item total " is some number ie a variable
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
Do you mean like this:

Code:
1)  Get an item 
2)  Add it's price to the total_price 
3)  Any more items? 
4a)    Yes, go to 1) 
4b)    No, multiply total_price by 7% to get sales_tax  
5)  Output total_price + sales_tax
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.