作业帮 > 综合 > 作业

If the total amount collected is known and the total sales t

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/18 15:13:53
If the total amount collected is known and the total sales tax is 6 percent,the amount of product sales may be calculated as:
S = T/1.06
S is the product sales and T is the total income (product sales plus sales tax).1.06 comes from the total of 6% sales tax.
The program should save a text file containing a report on the month's sales and tax,as shown below.
bash-2.04$ a.out
Please enter the month for this report:February
Please enter the year for this report:2005
Please enter the total income for this month:15000.25
Sales Tax Report Saved to file:SalesTaxData.txt
bash-2.04$ cat SalesTaxData.txt
Month:February 2005
-----------------------
Total Collected:$ 15000.25
Sales:$ 14151.18
County Sales Tax:$ 283.02
State Sales Tax:$ 566.05
Total Sales Tax:$ 849.07
-----------------------
bash-2.04$ a.out
Please enter the month for this report:October
Please enter the year for this report:2004
Please enter the total income for this month:26572.89
Sales Tax Report Saved to file:SalesTaxData.txt
bash-2.04$ cat SalesTaxData.txt
Month:October 2004
-----------------------
Total Collected:$ 26572.89
Sales:$ 25068.76
County Sales Tax:$ 501.38
State Sales Tax:$ 1002.75
Total Sales Tax:$ 1504.13
-----------------------
刚学编程真一点不会,
A retail company must file a monthly sales tax report listing the sales for the month and the amount of sales tax collected.Write a program that asks for the month,the year,and the total amount collected at the cash register (that is,sales plus sales tax).Assume the state sales tax is 4 percent and the county sales tax is 2 percent.Those are percentages of pre-tax prices (S,or "product sales" below).
If the total amount collected is known and the total sales t
只能望文兴叹.
你应该帮翻译成中文