計算の助けが必要です:
私はこれを行う必要があります:
Item ---- Qty ( 2 ) --- Rate ( $2 ) = Total ( $4 )
Item ---- Qty ( 3 ) --- Rate ( $3 ) = Total ( $9 )
SUBTOTAL = $13
SALES TAX (0.07) or (0.7%) = $0.91
TOTAL = $13.91
コードで。
私の疑似コードは次のとおりです。
Multiply qty * rate and input in total
subtotal = sum of item totals
sales tax = 0.07 * subtotal
total = sum of subtotal and sales tax
今説明した関数の特定のコードまたは事前に作成されたコードはありますか?
何か案は?