How to prevent repeated random values?
问题 The CPU and User is getting repeated cards. I've used the shuffle function, as well as pop. Is there a way to prevent useer and CPU from getting repeated cards. Here is an example of the program compiled Here are your cards: 1) The 10 of Clubs 2) The 4 of Diamonds 3) The 6 of Diamonds 4) The 7 of Clubs 5) The 10 of Clubs To play cards, simply type their number one at a time. When done, input blank 2 1 3 4 You played: The 4 of Diamonds The 10 of Clubs The 6 of Diamonds The 7 of Clubs CPU