a. Write the declarations for three set containers that can hold int values. Initialize the first set to hold the odd numbers in the range 1 through 9. Initialize the second set to hold the even numbers from 2 to 10.
b. Given the declarations in part (a), write statements to store their difference in the third set, and then output the contents of the third set. Does it matter whether you pass the first set or the second set as the first argument to the difference algorithm? That is, would the output differ if their places were reversed in the call?
c. Given the declarations in part (a), write statements to store the intersection of the first two sets in the third set and then output its contents.
d. Given the declarations in part (a), write statements to store the union of the first two sets in the third set and then output its contents.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.