Write a program according to the flow chart // This program assigns a 10% discount if a
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a program according to the flow chart
Transcribed Image Text:
// This program assigns a 10% discount if a customer orders more than 12 items, and a 20% discount if a customer orders more than 24 items (start) Declarations string name num items num PRICEEACH= 1.39 num CUT OFF1 = 12 num CUT OFF2 = 24 num DISCOUNT1 = 0.10 num DISCOUNT2 = 0.02 num total string QUIT = "ZZZ" housekeeping () name <> QUIT? No finish() (stop finish() Yes output "Program finished" return detailLoop() No No items < CUT_OFF1? (housekeeping()) output "Enter gique customer name >> input name detailLoop () return output "Enter number of items >> = Yes input items total items * PRICEEACH items < CUT_OFF1? total total- total DISCOUNT2 output "Total for " name, "is $", total. "Enter customer name or ", QUIT, "to quit >> Yes input name return. total total total DISCOUNT 1 // This program assigns a 10% discount if a customer orders more than 12 items, and a 20% discount if a customer orders more than 24 items (start) Declarations string name num items num PRICEEACH= 1.39 num CUT OFF1 = 12 num CUT OFF2 = 24 num DISCOUNT1 = 0.10 num DISCOUNT2 = 0.02 num total string QUIT = "ZZZ" housekeeping () name <> QUIT? No finish() (stop finish() Yes output "Program finished" return detailLoop() No No items < CUT_OFF1? (housekeeping()) output "Enter gique customer name >> input name detailLoop () return output "Enter number of items >> = Yes input items total items * PRICEEACH items < CUT_OFF1? total total- total DISCOUNT2 output "Total for " name, "is $", total. "Enter customer name or ", QUIT, "to quit >> Yes input name return. total total total DISCOUNT 1
Expert Answer:
Answer rating: 100% (QA)
include include using namespace std int main declare variables and consonants string name int items ... View the full answer
Related Book For
Business Statistics For Contemporary Decision Making
ISBN: 978-1118749647
8th edition
Authors: Black Ken
Posted Date:
Students also viewed these programming questions
-
5 Which one of the following correctly represents Sodium oxide? +2 XX a) Na 20 XX 6) 2NaOx x; 1-2 'xx' 1-2 c) 2 Na 20% c) Na XX XX 6 An element with atomic number_ will form a basic oxide. a) 7 (2,5)...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Claim The mean systolic blood pressure of all healthy adults is less than than 122 mm Hg Sample data. For 295 healthy adults, the mean systolic blood pressure level is 121.79 mm Hg and the standard...
-
Identify the five multicultural factors requiring special consideration.
-
When a hoisting cable is long, the weight of the cable itself contributes to the elongation. If a cable has a weight per unit length of w, a length of l , and a load P attached to the free end, show...
-
The Wilson Theater Ltd., owned by Tegan Wilson, will begin operations in March. The Wilson will be unique in that it will show only triple features of sequential theme movies. As of March 1, the...
-
The number of Sedan cars per household in a small town (a) construct a probability distribution, (b) graph the probability distribution using a histogram and describe its shape. Cars 0 1 2 3 381 259...
-
(Accounting Pronouncements) Standard-setting bodies have issued a number of authoritative pronouncements. A list is provided on the left, below, with a description of these pronouncements on the...
-
Create an outline for a training session to help a team avoid phishing. What could be included in that training session? What are some typical signs that an email might be fraudulent?
-
Solutions Plus is an industrial chemicals company that produces specialized cleaning fluids and solvents for a wide variety of applications. Solutions Plus just received an invitation to submit a bid...
-
A company reports inventory using the lower of cost and net realizable value. Below is information related to its year-end inventory: Inventory Quantity Cost NRV Unit A 12 $34 $36 Unit B 20 45 42...
-
Total sales were booked to the sales account without accounting for sales tax collected. What is the correct journal entry to record sales tax collected? When analyzing financial reports, such as the...
-
4. Explain what an arbitrageur would do in the following cases and how the arbitrage strategy would have no liabilities at expiration or when it is closed: a. The price of an ABC 40 call, expiring at...
-
The Agricultural Bank of China (AgBank) was the victim of an interesting 3.8 billion yuan ($578 million) embezzlement scheme. In early 2015, China's stockmarket was rallying, with share prices...
-
1. In the October 17, 2020 Minutes of the Audit Committee, Mr. Ramirez, Apollo's internal auditor, stated that the year before, the company had been able to save on audit fees when their staff had...
-
How do YouTube advertisements impact the purchase intention of Gen Z undergraduate students toward high-end products? Research Question 1: What are the factors of YouTube advertisements that...
-
Problem 23.47 Charge is uniformly distributed along a thin, flexible rod of length L. The rod is then bent into the semicircle shown in the figure (Figure 1). Figure 1 of 1 xx xxxx + Center XXXXX** X...
-
Evaluate the function at the given value(s) of the independent variable. Simplify the results. (x) = cos 2x (a) (0) (b) (- /4) (c) (/3) (d) ()
-
A national survey on telemarketing was undertaken. One of the questions asked was: How long has your organization had a telemarketing operation? Suppose the following data represent some of the...
-
Following are time-series data for eight different periods. Use exponential smoothing to forecast the values for periods 3 through 8.Use the value for the first period as the forecast for the second...
-
Use the values in the joint probability table to solve the equations given. a. P(C | A) = _____ b. P(B | D) = _____ c. P(A | B) =_____ C D A 3644 B 1109
-
The balance sheet of Dot Co. for the year ended 31 December 20X2, together with comparative figures for the previous year, is shown in Figure 13.7 (all figures :000). You are informed that there were...
-
Under IFRS, a group is a set of entities that the parent: A. Significantly influences. B. Owns a majority of the voting power in. C. Jointly controls. D. Controls.
-
Under IFRS 10, control over an entity means: A. Power to govern its financial and operating policies. B. The right to appoint the majority of its Board members. C. Power to affect the variable...
Study smarter with the SolutionInn App