This is the program: Write a program to score five card poker hands into one of
ID: 3619350 • Letter: T
Question
This is the program: Write a program to score five card poker hands into one of thefollowing categories: nothing, one pair, two, three of a kind,straight(in order with no gaps), flush(all the same suit, forexample, all spades), full house(one pair and three of a kind),four of a kind, straight flush(both a straight and a flush). Usetwo arrays, one to hold the value of the card and one to hold thesuit. Include a loop that allows the user to continue to score morehands until the user says the program should end. Rapunzel it can come from a file or keyboard so you can choosewhich one This is the program: Write a program to score five card poker hands into one of thefollowing categories: nothing, one pair, two, three of a kind,straight(in order with no gaps), flush(all the same suit, forexample, all spades), full house(one pair and three of a kind),four of a kind, straight flush(both a straight and a flush). Usetwo arrays, one to hold the value of the card and one to hold thesuit. Include a loop that allows the user to continue to score morehands until the user says the program should end. Rapunzel it can come from a file or keyboard so you can choosewhich oneExplanation / Answer
please rate - thanks you can change it to input the hand #include #include #include using namespace std; void shuffle(int[],int[]); void dealcards(int[],int[],int[],int[]); bool checkflush(int[]); bool checkstraight(int[]); void same(int [],bool &,bool &,bool &,bool &,bool&); int main() { int i,j,flushes,decks[52],deckn[52]; int hands[5],handn[5],scored,count; bool flush,straight; bool pair,pair2,three,four,nothing; string suit[4]={"hearts","diamonds","spades","clubs"}; stringcard[13]={"ace","2","3","4","5","6","7","8","9","10","jack","queen","king"}; int deal; char yesno='Y'; srand(time(0)); do {scored=0; shuffle(decks,deckn); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.