Question

Sales Tax Write a program that will compute the sales tax of an item and the...

Sales Tax Write a program that will compute the sales tax of an item and the total cost of the item with the sales tax. Then, print out the tax and the total cost. The input will be the cost of the item. The tax rate is 8%. Use the float registers and float values. The answer will be represented with 8 place values to the right of the decimal point - with an extraneous value in the 8th decimal position.

In QTSpims please

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<stdio.h>

#include<conio.h>

void main()

{

int total_price,item_price;

printf("Enter the item price");

scanf("%d",&item_price);

total_price=item_price*0.08;

printf("Total price = %d",&total_price);

getch();

}

Add a comment
Know the answer?
Add Answer to:
Sales Tax Write a program that will compute the sales tax of an item and the...
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
  • 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...

  • In this project you will write a C++ program that simulates the purchase of a single...

    In this project you will write a C++ program that simulates the purchase of a single item in an online store. What to do Write a C++ program that: 1. Prints out a welcome message. 2. Prompts the user for the following information: (a) Their first name (example: Roger) (b) Their last name (example: Waters) (c) The name of the product (example: Brick) (d) The unit price of the product (example: 1.99) (e) The quantity to buy (example: 200) (f)...

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

    Q2.     Write a program that will compute the total sales tax on a $45 purchase. Assume that the state sales tax is 4% and county sales tax is 2%. Declare a variable called price , of datatype double Ask the user to enter a price and the user inputs in the purchase price. Use setprecision(2) like Q1. in C++

  • 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.

  • Shopping Cart You are to write a program that reads the name of the item, the quantity of each it...

    C++ language Shopping Cart You are to write a program that reads the name of the item, the quantity of each item, and the cost per item from a file. The program will then print out the item and how much is owed for each item. After everything is read in, it will print out the total cost of the cart. Your program should have the following functions main - This function asks the user to enter a filename and...

  • 13. Write the program with at least two functions to solve the following problem (excluding the...

    13. Write the program with at least two functions to solve the following problem (excluding the main function). The members of a board are considering voting for a tax increase for 100 items. They are considering an increase of 5% for each item. Write a program that will prompt for and accept the current price for each item, then calculate and display their individual price after tax increases. At the end of the program, print the total price before and...

  • Basic C++ Tax Program If you could explain what code does what within the program that...

    Basic C++ Tax Program If you could explain what code does what within the program that would be appreciated! Just starting out and even using user input is not easy for me... Please write the "PrintTax" program that reads in an income value and print out its corresponding tax amount of 25% in the currency format (exactly 2 decimal places with a prefix of "$" sign) Here is an example of the output: C:\>Print Tax Please enter income: 100 Income:...

  • Write a JAVA program to monitor the flow of an item into an out of a...

    Write a JAVA program to monitor the flow of an item into an out of a warehouse. The warehouse has numerous deliveries and shipments for this item (a widget) during the time period covered. A shipment out (an order) is billed at a profit of 50% over the cost of the widget. Unfortunately each incoming shipment may have a different cost associated with it. The accountants of the firm have instituted a last-in, first out system for filling orders. This...

  • 1. Write a program that calculates sales price of each article. The program will get the...

    1. Write a program that calculates sales price of each article. The program will get the unit price of each article through the keyboard, and then calculate actual sales price. Actual sales price of each article is calculated as follows: • Sales Price = (2 x unit price) + (unit price x sales tax) Sales tax for each item is fixed to 5%. Your program should keep asking user to input unit price. If the user does not have any...

  • Write a Python program that reads user input from the command-line. The program should define a...

    Write a Python program that reads user input from the command-line. The program should define a function read Position, which reads the values for t, v0, and h0. If there is an IndexError, print 'Please provide the values for t, vO, and hO on the command line.'. If t, v0, or h0 are less than 0. print 't = # is not possible.' for each variable respectively. Note that the # represents the number entered on the command-line by the...

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
ADVERTISEMENT