Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

10.11 (Card Shuffling and Dealing) Modify the program you developed in Exercise

ID: 3535010 • Letter: 1

Question

10.11 (Card Shuffling and Dealing) Modify the program you developed in Exercise 10.10 so that it deals a five-card poker hand. Then write functions to accomplish each of the following:

a) Determine whether the hand contains a pair.

b) Determine whether the hand contains two pairs.

c) Determine whether the hand contains three of a kind (e.g., three jacks).

d) Determine whether the hand contains four of a kind (e.g., four aces).

e) Determine whether the hand contains a flush (i.e., all five cards of the same suit).

f) Determine whether the hand contains a straight (i.e., five cards of consecutive facevalues).



Explanation / Answer

#include #include #include #include using namespace std; int main() { srand(time(0)); int deck[52]; int i; string suitnames[4]={"spades", "diamonds", "clubs", "hearts"}; string ranknames[13]={"ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king"}; // create a new deck, with cards in order, but unique for(i=0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote