Question

Property Tax Program -Must use C programming

I attempted this program but couldn't figure what I did wrong ;(

Property Tax Program Complete the following program: A retail company must file a monthly sales tax report listing the total

0 1
Add a comment Improve this question Transcribed image text
Answer #1
#include <stdio.h>

void displayTaxes(double tax) {
   printf("%.2f", tax);
}

void calculateTaxes(double totalSales) {
   double state = totalSales * 0.04;
   double county = totalSales * 0.02;

   printf("State taxes: ");
   displayTaxes(state);

   printf("\nCounty taxes:");
   displayTaxes(county);

   printf("\nTotal taxes: ");
   displayTaxes(state + county);
}

void inputTotalSales() {
   double totalSales;
   printf("Enter total sales: ");
   scanf("%lf", &totalSales);
   calculateTaxes(totalSales);
}

int main(void) {
   inputTotalSales();
   return 0;
}

main main.c } ./main Enter total sales: 123456 State taxes: 4938.24 County taxes:2469.12 Total taxes: 7407.36

FOR HELP PLEASE COMMENT.
THANK YOU,

Add a comment
Know the answer?
Add Answer to:
Property Tax Program -Must use C programming I attempted this program but couldn't figure what I...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Must be answered with Python Programming language A county collects property taxes on the assessment value...

    Must be answered with Python Programming language A county collects property taxes on the assessment value of property, which is 60 percent of the property's actual value. For example if an ace of land is valued at $10,000 it assessment value is $6,000. The property tax is then 72 cents for each $100 of the assessment value. The tax for the acre assessed at S6,000 will be $43.20. Write a program that asks for the actual value of the peice...

  • This is JAVA. Must write a short description of this program, usually a sentence or two...

    This is JAVA. Must write a short description of this program, usually a sentence or two will be sufficient. All the classes, methods and data fields should be clearly documented (commented). Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program should display the amount of...

  • Can you solve this proble by using C# application? C# is one of programming languages supported...

    Can you solve this proble by using C# application? C# is one of programming languages supported by Visual Studio 2015. It combines the features of Java and C ++ and is suitbale for rapid application development. 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% and the county sales tax rate is 2%. Create an...

  • In Java, write a program that will ask the user to enter the amount of a...

    In Java, write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase...

  • For python: A county collects property taxes on the assessed value of property, which is 60...

    For python: A county collects property taxes on the assessed value of property, which is 60 percent of its actual value. For example, if a house is valued at $158,000.00 its assessed value is $94,800. This is the amount the homeowner pays tax on. If the tax rate is $2.64 for each $100.00 of assessed value, the annual property tax for this house would be $2502.72. Write a program that asks the user for the actual value of a piece...

  • C++ chapter 2 programming challenge #3 Write a program that will compute the total sales tax...

    C++ chapter 2 programming challenge #3 Write a program that will compute the total sales tax on a $95 purchase. Assume the state sales tax is 4 percent, and the county sales tax is 2 percent.

  • Write a program that will compute the total sales tax on a $95 purchase. Assume the...

    Write a program that will compute the total sales tax on a $95 purchase. Assume the state sales tax is 4 percent and the county sales tax is 2 percent ... and then display the amounts for the total sales tax, state sales tax, and county sales tax. the pseudo code is: since the tax rates do not vary, we will declare them as constants: const double STATE_SALES_TAX_RATE = 0.04 //copy initialization const double CNTY_SALES_TAX_RATE(0.02) //direct initialization declare variable to...

  • C++ Programming- CIS 1111 The CPlusPlus & LandMinusMinus Company needs you to write a program which...

    C++ Programming- CIS 1111 The CPlusPlus & LandMinusMinus Company needs you to write a program which will produce a report, in both number and chart form, which will display Net Sales for their three company divisions, for any given month of the year entered by the user. The corporate tax rate for the company is 30% (define as constant); the three division names are East-Coast, Mid-West, and West-Coast. Requirements Have the user enter a month name, and then process each...

  • C++ (i) Write a program that displays the following pattern: * *** ***** ******* ***** ***...

    C++ (i) Write a program that displays the following pattern: * *** ***** ******* ***** ***    * (ii) Katy bought 750 shares of stock at a price of $35.00 per share. She must pay her stockbroker a 2 percent commission for the transaction. Write a program that calculates and displays the following: The amount paid for the stock alone (without the commission) The amount of the commission) The total amount paid (stock plus commission) (iii) Write a program that...

  • PYTHON Programming Exercise 2: Create a Simple Cost Calculator Write a program that displays input fields...

    PYTHON Programming Exercise 2: Create a Simple Cost Calculator Write a program that displays input fields (item name and cost) and calculates and displays the calculated costs. The program should do the following: Provide data entry areas for item name and cost. Calculate and display the subtotal of all items. Adds a sales tax of 6% and calculate and displays the total cost. Enter the following values into your program. Mother Board $200. RAM $75. Hard Drive $72. Video Graphics...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT