C++, Develop a program that does the following: Generates a set of random intege
ID: 3642153 • Letter: C
Question
C++, Develop a program that does the following:Generates a set of random integers (10) in the range 0 through 50 and stores them in an array.
Generates another set of random integers (10) in the same range and stores them in another array.
Makes sure that both arrays contain proper sets by eliminating recurring values in each.
Depending on what the user wants, computes and prints on the screen the union, the intersection, or the difference of the two sets. Set does not contain recurring values.
Implementation:
Use at least 2 functions.
Explanation / Answer
here ya go. Hope this helps! #include #include #include #include #include using namespace std; void findUnion(vector vec1, vector vec2) { bool found = false; vector result = vec1; for(int i = 0; i < 10; ++i) { for(int j = 0; jRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.