Question

In: Computer Science

Sales tax is collected from buyers and remitted to the government. A retailer has to file...

Sales tax is collected from buyers and remitted to the government. A retailer has to file a monthly sales tax report which lists the sales for the month and the amount of sales tax collected, at both the county and state levels. Develop a program that will input the total collections for a month, calculate the sales tax on the collections, and display the county and state taxes. Assume that states have a 4% sales tax and countries have a 5% sales tax. Here is a sample input/output dialog. How to Formulate the algorithm using pseudocode and top-down, stepwise refinement in c program ?

Solutions

Expert Solution

Code:

#include <stdio.h>
#include <stdlib.h>

int main()
{
float sale_state, sale_country;
float sum=0;
float state_tax=0, country_tax=0;
printf("Sales in month in state\n"):
scanf("%f", &sale_state);
printf("Sales in month in country\n"):
scanf("%f", &sale_country);
  
state_tax = .4*sale_state;
country_tax = .5*sale_country;
  
printf("Tax collected in state level %d\n", state_tax):
printf("Tax collected in country level %d\n", country_tax):
  
return 0;
}

Top-down design:

1. Seller calculates how much sale he has made in the state.

2. Then he calculates 4% of his sales as sales tax for the state.

3. Seller calculates how much he has sold in the country.

4. Then he calculates 5% of the sales as country tax.


Related Solutions

A retail company must file a monthly sales tax report listing the sales for the month and the amount of sales tax collected.
make it in C++ with pointerA retail company must file a monthly sales tax report listing the sales for the month andthe 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). Assumethe 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,...
A retail company must file a monthly sales tax report listing the sales for the month and the amount of sales tax collected.
Must be done in Visual StudiosA 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.If the total amount collected is known and the total sales tax...
A retail company must file a monthly sales tax report listing the total sales for the month, and the amount of state and county sales tax collected.
A retail company must file a monthly sales tax report listing the total sales for the month, and the amount of state and county sales tax collected. The state sales tax rate is 5 percent and the county sales tax rate is 3 percent. Create a GUI application that allows the user to enter the total sales for the month into a text field. From this figure, the application should calculate and display the following: The number of county sales tax...
A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected.
C programming Monthly Sales Tax Program A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Write a program that asks the user to enter the total sales for the month. The application should calculate and display the amount of county sales tax, the amount of...
If the parent's government imposes a __ tax rate on funds remitted from a foreign subsidiary, a project is less likely to be feasible from the __ point of view.
If the parent's government imposes a __ tax rate on funds remitted from a foreign subsidiary, a project is less likely to be feasible from the __ point of view.high; subsidiary'shigh; parent'slow; parent'shigh; subsidiary's AND low; parent'sNone of these are correct.
Suppose the government imposes a tax on gasoline. Would the revenue collected from this tax likely...
Suppose the government imposes a tax on gasoline. Would the revenue collected from this tax likely be greater in the first year after it is imposed or in the fifth year? Explain using a graph. Would the deadweight loss from this tax be greater in the first year after it is imposed or in the fifth year? Explain using a graph.
Suppose that in Canada the government places a​ $1,500 tax on the buyers of new snowmobiles....
Suppose that in Canada the government places a​ $1,500 tax on the buyers of new snowmobiles. After the purchase of a new​ snowmobile, a buyer must pay the government​ $1,500. How would the imposition of the tax on buyers be illustrated in a​ graph? A. The tax will shift the demand curve up by​ $1,500. B. The tax will shift the demand curve down by​ $1,500. C. The tax will shift the demand up by​ $1,500 and supply curve down...
Suppose the government levies an excise tax on buyers of large-carat diamond rings. Before the tax,...
Suppose the government levies an excise tax on buyers of large-carat diamond rings. Before the tax, 4,500 rings were sold per year at an average price of $40,000. With the tax in effect, 2,500 rings are sold, buyers pay on average $40,500 per ring, and sellers receive $36,000 per ring a) what is the amount of the tax per ring? ($) b) In the scenario above, buyers pay what percent of the tax? c) In the scenario above, what is...
Suppose the government levies an excise tax on buyers of large-carat diamond rings. Before the tax,...
Suppose the government levies an excise tax on buyers of large-carat diamond rings. Before the tax, 4,500 rings were sold per year at an average price of $40,000. With the tax in effect, 2,500 rings are sold, buyers pay on average $40,500 per ring, and sellers receive $36,000 per ring. a. In the scenario above, what is the amount of the tax per ring? ($) b. In the scenario above, buyers pay: c. In the scenario above, what is the...
Who will bear the burden of tax if the tax is collected from the supplies, if...
Who will bear the burden of tax if the tax is collected from the supplies, if A. Supply is perfectly elastic? B. Supply is perfectly inelastic? C. Demand is perfectly elastic? D. Demand is perfectly inelastic?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT