题记
额……昨晚临睡前在网上搜到了这道题,感觉作业不难,比我想象得简单。
早晨5:30起来给孩子喂奶,喂完就毫无睡意了,脑袋里只有这道题,跃跃欲试
PROBLEM : SALES TAXES
Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical
products that are exempt. Import duty is an additional sales tax applicable on all imported goods
at a rate of 5%, with no exemptions.
When I purchase items I receive a receipt which lists the name of all the items and their price
(including tax), finishing with the total cost of the items, and the total amounts of sales taxes
paid. The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains
(np/100 rounded up to the nearest 0.05) amount of sales tax.
Write an application that prints out the receipt details for these shopping baskets...
额。。。我去参加今年的TW校招了,没想到今年的题仍然是这道……
由于签了保密协定,我把之前写的删掉了…… Sorry……

本文介绍了一道关于销售税计算的问题,涉及基本销售税和进口税的计算规则,并提及了具体的免税商品类别。作者分享了自己对该题目的思考过程。
1800

被折叠的 条评论
为什么被折叠?



