Thread: C++ Help
View Single Post
Old 09-15-2005, 07:05 PM   #20
chickendude
Away from Computer
FFR Simfile AuthorFFR Veteran
 
chickendude's Avatar
 
Join Date: Sep 2003
Location: Massachusetts
Age: 33
Posts: 1,901
Send a message via AIM to chickendude
Default

The 'Final Price' (using the variable fprice)
is the new price

I assumed you put in percentages for salestax and markup

like 5% sales tax and 20% markup

tax = storeprice * (1 + (taxrate/100) )
it just makes the % into a fraction and add one so it increases (so its x1.05 not x.05)

then
storeprice = originalprice * (1 + (markup/100) )
same reasoning

and new price = storeprice + tax

thats what I did in my program, and guido made syntax updates
__________________
chickendude is offline   Reply With Quote