2
我需要計算幫助:幫助計算髮票
我需要這樣做:
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
的功能的任何特定的或預製的代碼,我剛纔解釋?
任何想法?
「乘法數量*率和輸入共」 - 不是一個小曖昧更多。 – 2011-01-21 07:57:35
除了簡單算術,我沒有看到任何東西。你試過什麼了?哪裏出問題了? – 2011-01-21 07:57:57