# Equation Problem=Monthly Sales Tax

Page 1 of 1

## 2 Replies - 2518 Views - Last Post: 22 October 2009 - 04:10 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=133751&amp;s=c8b788ab7c35d0a05e38d381131ac644&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 camerondg

Reputation: 0
• Posts: 18
• Joined: 09-November 08

# Equation Problem=Monthly Sales Tax

Posted 22 October 2009 - 01:09 PM

Here is the problem:
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 registar(that is, sales plus sales tax). Assume the state sales tax is 4 percent and the county sales tax is 2 percent.

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

where "s" is the product sales and "t" is the total income(product sales plus sales tax).
The program should display a report similar to the following:
Month: March 2008
---------------------
Total Collected: \$ 26572.89
Sales: \$ 25068.76
County Sales Tax: \$ 501.38
State Sales Tax: \$ 1002.75
Total Sales Tax: \$ 1504.13

My problem is, how did the come up with the state sales tax? that is the one equation the has me stumped.

Is This A Good Question/Topic? 0

## Replies To: Equation Problem=Monthly Sales Tax

### #2 jwwicks

Reputation: 24
• Posts: 162
• Joined: 31-July 08

## Re: Equation Problem=Monthly Sales Tax

Posted 22 October 2009 - 02:19 PM

Hello,

sales * 0.04

Jw

camerondg, on 22 Oct, 2009 - 12:09 PM, said:

Here is the problem:
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 registar(that is, sales plus sales tax). Assume the state sales tax is 4 percent and the county sales tax is 2 percent.

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

where "s" is the product sales and "t" is the total income(product sales plus sales tax).
The program should display a report similar to the following:
Month: March 2008
---------------------
Total Collected: \$ 26572.89
Sales: \$ 25068.76
County Sales Tax: \$ 501.38
State Sales Tax: \$ 1002.75
Total Sales Tax: \$ 1504.13

My problem is, how did the come up with the state sales tax? that is the one equation the has me stumped.

### #3 redhotfire0

Reputation: 10
• Posts: 210
• Joined: 13-July 09

## Re: Equation Problem=Monthly Sales Tax

Posted 22 October 2009 - 04:10 PM

Use 1.04 * sale; do not have to the add the number being multiplied.