With our covering of sets, it makes sense to reinforce those concepts through code. I'd like you to develop the beginnings of a program that will manipulate sets.
Write a program that does the following:
You may develop the program with the following assumptions in mind:
You resulting program should operate in a manner similar to the following (output doesn't have to exactly match):
lab46:~/src/discrete/p03$ ./setprog Enter a unique value (-1 to quit): 1 Enter a unique value (-1 to quit): 2 Enter a unique value (-1 to quit): 4 Enter a unique value (-1 to quit): 8 Enter a unique value (-1 to quit): 16 Enter a unique value (-1 to quit): 4 Duplicate Value Detected! Discarding... Enter a unique value (-1 to quit): 32 Enter a unique value (-1 to quit): 64 Enter a unique value (-1 to quit): -1 Set Built. Displaying... A = { 1, 2, 4, 8, 16, 32, 64 } lab46:~/src/discrete/p03$
I will be evaluating your program one-on-one at the start of class, when this is due. If you do not show up, you will not receive credit any for it.
Please be sure your program also meets the following criteria: