Integer numFeatured items is read from input. Then, numFeatured Items strings are read and stored in vector mayFeatured items, and numFeatured Items strings are read and stored in vector sepFeatured items. Perform the following tasks: • If mayFeatured Items is equal to sepFeatured items, output "May's featured items and September's featured items are identical." Otherwise, output "May's featured items and September's featured items are not identical." • Assign sepBackup as a copy of sepFeatureditems. Ex: If the input is 4 sofa armchair shoerack hammock couch cupboard bookshelf mattress, then the output is: May's featured items: sofa armchair shoerack hammock September's featured items: couch cupboard bookshelf mattress May's featured items and September's featured items are not identical. September's backup: couch cupboard bookshelf mattress

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Integer numFeatured items is read from input. Then, numFeatureditems strings are read and stored in vector mayFeatured items,
and numFeatured Items strings are read and stored in vector sepFeatured Items. Perform the following tasks:
.
If mayFeatured items is equal to sepFeatured Items, output "May's featured items and September's featured items are
identical." Otherwise, output "May's featured items and September's featured items are not identical."
Assign sepBackup as a copy of sepFeatureditems.
Ex: If the input is 4 sofa armchair shoe rack hammock couch cupboard bookshelf mattress, then the output is:
May's featured items: sofa armchair shoerack hammock
September's featured items: couch cupboard bookshelf mattress
May's featured items and September's featured items are not identical.
September's backup: couch cupboard bookshelf mattress
1 #include <iostream>
2 #include <vector>
3 using namespace std;
4
5 int main() {
6
7
8 vector<string> mayFeatured Items;
9 vector<string> sepFeatured Items;
10 vector<string> sepBackup;
11
12
13
int numFeatured Items;
unsigned int i;
cin >> numFeaturedItems;
14 mayFeatured Items.resize(numFeatured Items);
sepFeatured Items.resize(numFeatured Items);
CS Scanned with c
features canner
18 for (i = 0; i < mayFeatured Items.size(); ++i) {
4.6
maulankuadhom li
Transcribed Image Text:Integer numFeatured items is read from input. Then, numFeatureditems strings are read and stored in vector mayFeatured items, and numFeatured Items strings are read and stored in vector sepFeatured Items. Perform the following tasks: . If mayFeatured items is equal to sepFeatured Items, output "May's featured items and September's featured items are identical." Otherwise, output "May's featured items and September's featured items are not identical." Assign sepBackup as a copy of sepFeatureditems. Ex: If the input is 4 sofa armchair shoe rack hammock couch cupboard bookshelf mattress, then the output is: May's featured items: sofa armchair shoerack hammock September's featured items: couch cupboard bookshelf mattress May's featured items and September's featured items are not identical. September's backup: couch cupboard bookshelf mattress 1 #include <iostream> 2 #include <vector> 3 using namespace std; 4 5 int main() { 6 7 8 vector<string> mayFeatured Items; 9 vector<string> sepFeatured Items; 10 vector<string> sepBackup; 11 12 13 int numFeatured Items; unsigned int i; cin >> numFeaturedItems; 14 mayFeatured Items.resize(numFeatured Items); sepFeatured Items.resize(numFeatured Items); CS Scanned with c features canner 18 for (i = 0; i < mayFeatured Items.size(); ++i) { 4.6 maulankuadhom li
Integer numFeatured Items is read from input. Then, numFeatured Items strings are read and stored in vector mayFeatured items,
and numFeatured Items strings are read and stored in vector sepFeatured Items. Perform the following tasks:
●
If mayFeatured Items is equal to sepFeatured Items, output "May's featured items and September's featured items are
identical." Otherwise, output "May's featured items and September's featured items are not identical."
Assign sepBackup as a copy of sepFeatured Items.
●
Ex: If the input is 4 sofa armchair shoerack hammock couch cupboard bookshelf mattress, then the output is:
May's featured items: sofa armchair shoerack hammock
September's featured items: couch cupboard bookshelf mattress
May's featured items and September's featured items are not identical.
September's backup: couch cupboard bookshelf mattress
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
for (i = 0; i < mayFeatured Items.size(); ++i) {
cin >> mayFeatured Items.at(i);
cout << mayFeatured Items.at (i) << " ";
35
36
}
cout << endl;
cout << "September's featured items: ";
for (i = 0; i < sepFeatured Items:size(); ++i) {
cin >> sepFeatured Items.at(i);
cout << sepFeatured Items.at (i) << " ";
}
cout << endl;
* Your code goes here */
CS packim. 12 al
cout << "September's backup: ".
cout<<sepBackup.at (1) << "
12canner
1
-0-0
Transcribed Image Text:Integer numFeatured Items is read from input. Then, numFeatured Items strings are read and stored in vector mayFeatured items, and numFeatured Items strings are read and stored in vector sepFeatured Items. Perform the following tasks: ● If mayFeatured Items is equal to sepFeatured Items, output "May's featured items and September's featured items are identical." Otherwise, output "May's featured items and September's featured items are not identical." Assign sepBackup as a copy of sepFeatured Items. ● Ex: If the input is 4 sofa armchair shoerack hammock couch cupboard bookshelf mattress, then the output is: May's featured items: sofa armchair shoerack hammock September's featured items: couch cupboard bookshelf mattress May's featured items and September's featured items are not identical. September's backup: couch cupboard bookshelf mattress 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 for (i = 0; i < mayFeatured Items.size(); ++i) { cin >> mayFeatured Items.at(i); cout << mayFeatured Items.at (i) << " "; 35 36 } cout << endl; cout << "September's featured items: "; for (i = 0; i < sepFeatured Items:size(); ++i) { cin >> sepFeatured Items.at(i); cout << sepFeatured Items.at (i) << " "; } cout << endl; * Your code goes here */ CS packim. 12 al cout << "September's backup: ". cout<<sepBackup.at (1) << " 12canner 1 -0-0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education