Not sure what you are looking for exactly... Total = $1.00 Tax = 106% (Reason for doing it this way is so you dont have to multiply for 6% then re-add the total...) Total * Tax = Total With Tax $total = 1.00; $tax = 1.06; // 6% sales tax.... for 7.5 use 1.075 $with_tax = $total * $tax; PHP:
It really depends on how you really do the Psuedocode. Some people would agree with what I did, some won't, others do it almost exactly like source code, which I disagree with. BEGIN SalesTax (Amount) SET Rate to 1.06 SET WithTax to Amount * Rate RETURN WithTax END SalesTax Code (markup):
This look good? Any errors? [start] print "Type a dollar and cent amount." print input "Press Enter' alone for help ?"; amount print if amount = 0 then goto [help] print let tax = amount *0.05 print "Tax is: "; tax; " . Total is: "; tax + amount goto [start] [help] cls print "This tax program determines how much tax is" print "due on an amount entered and also computes" print "the total amount. The tax rate is 5%" print input "Press [Enter] to continue."; dummyVariable print goto [start]