Write an algorithm and a C++ program that asks the user to enter a store's sales...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an algorithm and a C++ program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. Use a function to sort the sales in ascending order. Display the results as shown the following sample output. Sample output: Enter the sales for day 1: $10455 Enter the sales for day 2: $9078 Enter the sales for day 3: $12846 Enter the sales for day 4: $11611 Enter the sales for day 5: $8972 Enter the sales for day 6: $13488 Enter the sales for day 7: $10187 Total Sales: $76637 Day 5 2 7 Sales 8972 9078 10187 10455 11611 12846 13488 Write an algorithm and a C++ program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. Use a function to sort the sales in ascending order. Display the results as shown the following sample output. Sample output: Enter the sales for day 1: $10455 Enter the sales for day 2: $9078 Enter the sales for day 3: $12846 Enter the sales for day 4: $11611 Enter the sales for day 5: $8972 Enter the sales for day 6: $13488 Enter the sales for day 7: $10187 Total Sales: $76637 Day 5 2 7 Sales 8972 9078 10187 10455 11611 12846 13488
Expert Answer:
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
In 2006, Walmart was operating more than 6,500 stores with 1.8 million employees around the world. In the early 1990s, Walmart Stores Inc. expanded into Canada, with the purchase of 122 stores from...
-
A human eyeball is about 2.0 cm long and the pupil has a maximum diameter of about 8.0 mm. What is the "speed" of this lens?
-
A machine is used to fill cans with motor oil additive. A single sample can is obtained. Since the filling process is automated, it has very stable variability, and long experience indicates that...
-
Consider the multiple regression model fit to the house price data in Problem 3.7. Problem 3.7 Consider the house price data in Table B.4. a. Construct a normal probability plot of the residuals....
-
Why might managers seeking a monthly bonus on attaining a target operating income prefer the sales method of accounting for byproducts rather than the production method?
-
You purchase a Bond with a 11% Coupon Rate and a face value of $1000. Calculate the current value given the following factors: Years to Maturity Yield to Maturity (%) Current Price 5 9 5 6 6 6 B)...
-
David R. and Ella M. Cole (ages 39 and 38, respectively) are husband and wife who live at 1820 Elk Avenue, Denver, CO 80202. David is a self-employed consultant, specializing in retail management and...
-
Write a python script to implement below logical operations of a three Boolean variables p, q and r. Logical Operation Implemented statement 1. Disjunction Pvq 2. Conjunction Par pOq 3. Exclusive or...
-
Describe the strategy execution void and the relative importance of strategy versus execution.
-
Will the BPM maturity of the organization impact the implementation of BPM and, if so, why?
-
Consider Table 10.1, which has data on insurance status and medical expenditures for different types of professors at Adverse Selection University (ASU). In 2014, every employee of ASU was offered a...
-
What are the purpose and benefit of performance management guidelines?
-
How will the selected BPM approach impact the likelihood of success?
-
What is the average temperature of water in the top 5 meters in April? In August? How do those compare to the average temperatures at 15-20 meters of those months?
-
Phosgene, COCl2, is a toxic gas used in the manufacture of urethane plastics. The gas dissociates at high temperature. At 400oC, the equilibrium constant Kc is 8.05 104. Find the percentage of...
-
What tag causes a line break? What tag causes a paragraph break? What tag displays a horizontal rule?
-
Describe the limitation of static methods.
-
Briefly describe the difference between variable assignment and variable initialization.
-
Consider expansion of a function in terms of a series \(F_{n}(x)\) in the following form: \[f(x)=\sum_{n} A_{n} F_{n}(x)\] If the functions \(F_{n}\) are orthogonal then this property helps to unfold...
-
A concrete wall \(20 \mathrm{~cm}\) thick is initially at a temperature of \(20^{\circ} \mathrm{C}\), and is exposed to steam at pressure \(1 \mathrm{~atm}\) on both sides. Find the time for the...
-
Analyze the transient problem with the Dirichlet condition for a long cylinder and for a sphere. Derive expressions for the eigenfunctions, eigenconditions, and eigenvalues. Find the series...
Study smarter with the SolutionInn App