Write the pseudo-code to calculate and print the total cost of an item. The subtotal cost...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write the pseudo-code to calculate and print the total cost of an item. The subtotal cost is based on unit cost and quantity, and the total cost is based on subtotal and a 15% tax rate. Compute the following two variables: subtotal = unit *quantity total = subtotal + tax * subtotal The unit cost is based on the price-break table below, and your solution must use an if-statement to determine the correct unit cost. Ask the user for the quantity and print the total cost. quantity 1 2 to 4 5 or more unit cost $3.00 $2.00 $1.50 Write the pseudo-code to calculate and print the total cost of an item. The subtotal cost is based on unit cost and quantity, and the total cost is based on subtotal and a 15% tax rate. Compute the following two variables: subtotal = unit *quantity total = subtotal + tax * subtotal The unit cost is based on the price-break table below, and your solution must use an if-statement to determine the correct unit cost. Ask the user for the quantity and print the total cost. quantity 1 2 to 4 5 or more unit cost $3.00 $2.00 $1.50
Expert Answer:
Answer rating: 100% (QA)
Certainly Below is a pseudocode to calculate and print the total cost of an item based on the giv... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The frequency distributions shown indicate the percentages of public school students in fourth-grade reading and mathematics who performed at or above the required proficiency levels for the 50...
-
As a consultant dealing with TQM practices, you are concerned with the objectives or the principles for implementing TQM. In this regard, explain the principles for which TQM is implemented.
-
6. 5. Set up and evaluate a double integral representing the volume under the surface z = x + y but above the region in the first quadrant of the x, y -plane outside of the circle r = 4 and inside...
-
9) The mole (Avogadro number N) is defined as the number of atoms in exactly 12 grams of 2C, calculate the: a) number of atoms in 2 g of C b) number of atoms in 5 g of C
-
Reformulate Exercise 11.2.33 for a mass-spring chain connected to both top and bottom supports. Do the same conclusions hold?
-
Shi Import-Export's balance sheet shows $300 million in debt, $50 million in preferred stock, and $250 million in total common equity. Shi's tax rate is 40%, rd= 6%, rps= 7.9%, and rs= 14%. If Shi...
-
Pyramid Construction Company is planning an investment of \($174,000\) for a bulldozer. The bulldozer is expected to operate for 1,400 hours per year for five years. Customers will be charged \($80\)...
-
On August 1, Jackson Corporation (a U.S.-based importer) placed an order to purchase merchandise from a foreign supplier at a price of 200,000 rupees. Jackson will receive and make payment for the...
-
A Supervision Challenge: CONTRIBUTING TO HIGH QUALITY AND PRODUCTIVITY AT SHEARER S FOODS ( Page 2 1 8 ) The opening case discusses Shearer s Foods broad drive for perfection and presents the...
-
The diagram below represents a process where two components are made at stations A1 and A2 (one component is made at A1 and the other at A2). These components are then assembled at station B and...
-
Carla Vista Inc. had sales of $2,390,000 for the first quarter of 2022 (it sold 239,000 units). In making the sales, the company incurred the following costs and expenses. Variable Fixed Cost of...
-
Varcoe Corporation bases its budgets on the activity measure customers served. During September, the company planned to serve 37,500 customers, but actually served 32,500 customers. Revenue is $3.95...
-
Moonlight Drive-Ins Ltd. borrowed money by issuing $6,000,000 of 5% bonds payable at 96.5 on July 1, 2021. The bonds are 10-year bonds and pay interest each January 1 and July 1. Read the...
-
Assume that you are the executive manager of a digital marketing/advertising company that has been struggling financially for a few years. Your company finally manages to secure a contract with M-...
-
A pot at 42.9 C has been placed in a -17.1 C freezer. The pot's surface area is 0.145 m and its emissivity is 0.533. Find the pot's net rate of radiation P. P = W
-
Use the linear wave equation to determine the wave speed of a wave modeled with the wave function y(x, t) = (0.10 m)sin[(1.50 m-1)x + (5.00 s)]. (Use the following as necessary: x and t. ay(x, t)...
-
compute the numerical values of (u, v) for the following case: = 27 m/s, 1 = 2,0 3 x = 1, y = 1, x = 3, y = 4
-
The following data are supplied for the common stocks of Nikola Corporation, Tesla, Inc. and General Motors: Nikola Corp (NKLA) Tesla Inc. (TSLA) Close Price ($) Close Price ($) 67.53 30.00 40.81...
-
What is meant by the garnishment of wages?
-
How is the information that is usually on a paper paystub given to an employee if the employer is using electronic paystubs?
-
When is time spent by employees in attending lectures and meetings for training purposes not counted as working time?
-
The vertices in the graph below are grain elevators, some of which can be connected by chutes to neighboring elevators, for the purpose of shifting grain from one location to another. The edges are...
-
An alternative algorithm for finding the shortest path from the root \(v_{0}\) to each vertex \(v\) in a directed graph, called Dijkstra's algorithm, is as follows. Initialize the cost \(C(v)\) of a...
-
Use Dijkstra's algorithm (see Exercise 14) to list shortest paths to all vertices \(v_{1}, \ldots, v_{7}\) in the graph of Exercise 11 Do this by hand, rather than with Mathematica.
Study smarter with the SolutionInn App