Write a program to play poker! You can provide 5 cards to the player, let that player choose new
cards, and then determine how good the hand is. Think about whether this is easy to do. What problems
might you have in terms of keeping track of cards that have been drawn already?
I have done this below so far except I will have a problem with keeping track of cards that have already been drawn. Also I'm not sure how to account for cards such as ace, king, queen, jack. Should I use an enumeration?
Code:#include <iostream> //include header files #include <cstdlib> #include <ctime> using namespace std; int card1() { srand(time(NULL)); return (rand()%52)+1; } int card2() { return (rand()%52)+1; } int card3() { return (rand()%52)+1; } int card4() { return (rand()%52)+1; } int card5() { return (rand()%52)+1; } int main () { int card_one = card1(); int card_two = card2(); int card_three = card3(); int card_four = card4(); int card_five = card5(); cout << card_one << " : " << card_two << " : " << card_three << " : " << card_four << " : " << card_five << endl; }