Question: C++ please! Thank you Enter first sequence (Q when done): 111Q Enter second sequence (Qwhen done): 1 Q These are: Same Exercise 1: Same Set
C++ please! Thank you

Enter first sequence (Q when done): 111Q Enter second sequence (Qwhen done): 1 Q These are: Same Exercise 1: Same Set (This is essentially Exercise P6.9 of the book) Write a program samesct.cpp that takes in two sequences of positive integers and checks whether they live the same elements in some order, yoring cluplicates. For example, the two sexlientes 1 4 9 16 9 7 4 9 11 Note: Assume the user inputs at least 1 positive integer and a maximum of 10 integers. Note on formatting: We'll stress again - please have the formatting like the above examples. Make sure to have colons. No invalid inputs: You do NOT have to worry about the user giving invalid inputs like characters (except for Q), really large numbers, etc. and 11 11 7 9 16 4 1 . You may not use stdatx. would be considered identical. You may consider typing up one or more functions to help organize things. Assume the user inputs at least one positive integer for each sequence. Hint: You may want to do cin.clear(); string discard cin >> discard; before reading input for the second scquence of numbers. Can you explain why? See Special Topic 4.1 in Section 4.5 (or slide 22 of the Chapter 4 lecture slides) Please have the output formatted exactly like the following examples: Enter first sequence (Q when dono): 1 4 9 16 9 7 1 9 11 Q Enter second sequence (Q when done): 11 11 7 9 16 4 1 0 These are: Sune Enter first sequence (Qwhen done): 1 2 3 4 Enter second sequence (when done): 120 These are: Different
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
