Read (day-of-the-week,value) pairs from standard input. For example: Tuesday 23 Friday 56 Tuesday 3 Thursday 99 Collect
Question:
Read (day-of-the-week,value) pairs from standard input. For example:
Tuesday 23 Friday 56 Tuesday –3 Thursday 99
Collect all the values for each day of the week in a vector. Write out the values of the seven day-of-the-week vectors. Print out the sum of the values in each vector. Ignore illegal days of the week, such as Funday, but accept common synonyms such as Mon and monday. Write out the number of rejected values.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (14 reviews)
include stdafxh include stdlibfacilitiesh include class ValuePair private create a name value pair variable struct DayValue int value string day publi...View the full answer
Answered By
Areesha Fatima
Hey! Areesha here. I have recently completed my bachelors in software engineering and am currently pursuing my masters in the same. As a tutor, I try my best to put myself in my students' shoes so that I can better understand where they are having difficulty understanding and so we can explore ways to resolve the issue together. I teach, keeping in mind the level of my students, and that has proven super beneficial for me so far. I will ensure the same practices for my students here as well.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
The Gaubert Marketing Company needs the following number of telemarketers on the phones during the upcoming week: Monday 23, Tuesday 16, Wednesday 21, Thursday 17, Friday 20, Saturday 12, and Sunday...
-
The following data represent the number of drivers involved in fatal crashes in the United States in 2013 by day of the week and gender. (a) Among Sunday fatal crashes, what is the probability that a...
-
Write a program to generate the entire calendar for one year. The program must get two values from the user: (1) the year and (2) the day of the week for January 1st of that year. The year, which...
-
2) A parallel plate capacitor is used to build an accelerometer. It senses movement by allowing one plate to slip with respect to the other, so that the area of overlap of the plates varies from ten...
-
The following data are from a study of reading achievement in children randomly assigned to be taught via a phonics curriculum (N = 15) versus a whole-language curriculum (N = 10). Calculate t and...
-
Paul Fenson is employed as a shipping supervisor. In the evenings and on weekends, he holds a second job as a real estate salesman for a national real estate firm. His financial information for 2020...
-
What assumptions underlie rational decision-making theories? LO.1
-
Determine the amount of the standard deduction allowed for 2014 in the following independent situations. In each case, assume that the taxpayer is claimed as another person's dependent. a. Curtis,...
-
Your answer is partially correct. The pretax financial income (or loss) figures for Tamarisk Company are as follows. 2016 2017 2018 275,000 88,000 (176,000) (115,000) 148,000 108,000 2019 2020 2021...
-
S. A. Harrington Company is a U.S.-based company that prepares its consolidated financial statements in accordance with U.S. GAAP . The company reported income in 2015 of $5,000,000 and stockholders'...
-
How do you test if an input operation succeeded?
-
Describe the process of how exceptions are thrown and caught.
-
A closed vessel of \(0.15 \mathrm{~m}^{3}\) capacity contains a mixture of methane \(\left(\mathrm{CH}_{4} ight)\) and air, the air being \(20 \%\) in excess of that required for chemically correct...
-
CLT HW Score: 0/19 0/19 answered Question 4 < = 31. You intend to draw a A population of values has a normal distribution with = 232.9 and random sample of size n = 165. Please show your answers as...
-
Q-3: Estimate fxy dx + x2 dy: where c is given by [Hint: Use Green's theorem -1
-
1. Determine completely the resultant of the four forces shown in the figure. Each force makes a 15 angle with the vertical, except the 200 N force which is vertical. Find the action line (position)...
-
1: Based on the results of your Learning Style produce a 1 pg reflection. (this is the result of the test i took: Your learning preference:Multimodal (AK) SharePeople with your preference like:...
-
Explain what the petty cashier should do if he or she thinks that the imprest amount is inadequate.
-
How much should an investor be willing to pay today for an investment that will pay $17,400 in nine months from now if the discount rate is 1.25%?
-
The outer loop controls the number of students. Note that the inner loop of this program is always executed exactly three times, once for each day of the long weekend. Modify the code so that the...
-
List some application-layer protocols mentioned in this chapter
-
In Figure 2.10, when the IP protocol decapsulates the transport-layer packet, how does it know to which upper layer protocol (UDP or TCP) the packet should be delivered? Figure 2.10 HTTP DNS SNMP ...
-
Match the following to one or more layers of the TCP/IP protocol suite: a. Creating user datagrams b. Responsibility for handling frames between adjacent nodes c. Transforming bits to electromagnetic...
-
assume that we have only two following risk assets (stock 1&2) in the market. stock 1 - E(r) = 20%, std 20% stock 2- E(r) = 10%, std 20% the correlation coefficient between stock 1 and 2 is 0. and...
-
Flexible manufacturing places new demands on the management accounting information system and how performance is evaluated. In response, a company should a. institute practices that reduce switching...
-
Revenue and expense items and components of other comprehensive income can be reported in the statement of shareholders' equity using: U.S. GAAP. IFRS. Both U.S. GAAP and IFRS. Neither U.S. GAAP nor...
Study smarter with the SolutionInn App