You sell the book C++ for Fools. Write a program that has you enter a years worth
Question:
You sell the book C++ for Fools. Write a program that has you enter a year’s worth of monthly sales (in terms of number of books, not of money).The program should use a loop to prompt you by month, using an array of char * (or an array of string objects, if you prefer) initialized to the month strings and storing the input data in an array of int. Then, the program should find the sum of the array contents and report the total sales for the year.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 60% (10 reviews)
ANSWER include using namespace std int main const int MONTHS 12 int totalSales 0 ...View the full answer
Answered By
Aketch Cindy Sunday
I am a certified tutor with over two years of experience tutoring . I have a passion for helping students learn and grow, and I firmly believe that every student has the potential to be successful. I have a wide range of experience working with students of all ages and abilities, and I am confident that I can help students succeed in school.
I have experience working with students who have a wide range of abilities. I have also worked with gifted and talented students, and I am familiar with a variety of enrichment and acceleration strategies.
I am a patient and supportive tutor who is dedicated to helping my students reach their full potential. Thank you for your time and consideration.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Motorvehicles of Philadelphia, Inc., reported the following financial statements for 2012: Compute the following investing cash flows: (Enter all amounts in thousands.) a. Acquisitions of plant...
-
For this program you will write a program that will do the following: Read in the numbers from the text file (Values.txt) and store those values in an array. You will declare the array of size 20....
-
Write a program that determines how many credits 10 students need to graduate. Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. Place the algorithm...
-
Explain fully the role played by unplanned investment in inventories in determining equilibrium in the Keynesian model. Use the examples of AD > GDP and AD < GDP to illustrate your answer.
-
McDonnoughs Hamburger Company wishes to lend $500,000 to its Japanese subsidiary. At the same time, Tsunami Heavy Industries is interested in making a medium-term loan of approximately the same...
-
In protocol 6, MAX_SEQ = 2n - 1. While this condition is obviously desirable to make efficient use of header bits, we have not demonstrated that it is essential. Does the protocol work correctly for...
-
Refer to the sample statistics from Exercise 5 and determine whether any of the house prices below are unusual. Explain your reasoning. (a) $225,000 (b) $80,000 (c) $200,000 (d) $147,000 Data from...
-
Assume the following financial data for the Noble Corporation and Barnes Enterprises: a. If all the shares of the Noble Corporation are exchanged for those of Barnes Enterprises on a share-for-share...
-
Maple Woods Inc. manufactures lounge chairs available in both a luxury and a standard model. The company has made the standard model for years; the luxury model was introduced several years ago to...
-
Identify the kinds of agreement or disagreement most probably exhibited by the following pairs: a. Answer a fool according to his folly, Lest he be wise in his own conceit. b. Answer not a fool...
-
Write a for loop that prints the values 1 2 4 8 16 32 64 by increasing the value of a counting variable by a factor of two in each cycle.
-
What would the following code fragment print if it were part of a valid program? int k = 8; do cout <
-
Find the slope and y-intercept of the line with the given equation and sketch the graph using the slope and y-intercept. A calculator can be used to check your graph. 24x + 40y = 15
-
1.) Graphically show how an increase in the population affects price and quantity. How would a decrease impact price and quantity? 2.) What would have happened in this case if the shop owner had...
-
After many years of amateur status, rugby union became a professional sport in 1995. Pick one of the four major North American team sports (baseball, basketball, football, or ice hockey), and imagine...
-
While in a geosynchronous orbit around Earth, a 560-kg communications satellite has a weight of 125 N. The distance of the satellite from the surface of Earth, expressed in scientific notation, is b...
-
Describe your expectations regarding supervision, such as how you will communicate with your supervisor (e.g., phone, text, email), expected activities that you will participate in, what to do if you...
-
How does the Exchequer Chamber define "Consideration? How is it different from the Restatement (Second) definition? How does the court analyze Consideration? Does your analysis of Consideration...
-
Consider a file system that uses a modifed contiguous-allocation scheme with support for extents. A file is a collection of extents, with each extent corresponding to a contiguous set of blocks. A...
-
1. What are some current issues facing Saudi Arabia? What is the climate for doing business in Saudi Arabia today? 2. Is it legal for Auger's firm to make a payment of $100,000 to help ensure this...
-
Design the simplest circuit that has three inputs, x 1 , x 2 , and x 3 , which produces an output value of 1 whenever two or more of the input variables have the value 1; otherwise, the output has to...
-
For the timing diagram in Figure P2.4, synthesize the function f (x 1 , x 2 , x 3 ) in the simplest sum-of-products form. X2 X3 f 0 0 0 Time
-
Use algebraic manipulation to derive the simplest product-of-sums expression for the function f (x 1 , x 2 , x 3 , x 4 , x 5 ) = (x 2 + x 3 + x 5 )(x 1 + x 3 + x 5 )(x 1 + x 2 + x 5 )(x 1 + x 4 + x 5...
-
Reyes Manufacturing Company uses a job order cost system. At the beginning of January, the company had one job in process (Job 201) and one job completed but not yet sold (Job 200). Job 202 was...
-
n-1 3.) Given the discrete sequence x(n) = (3) u(n - 1) where u is the unit step sequence, do the following: (SHOW ALL WORK) a.) Compute the discrete time Fourier Transform (DTFT) X(w) of x(n). b.)...
-
The Cubby Bear started the month with a food inventory of $6,000 in the storeroom. During the month, food purchases totaling $8,000 were delivered to the storeroom and food totaling $8,000 was issued...
Study smarter with the SolutionInn App