subject

Hi i need in my c++ homework. "write a program that reads five cards from the user, then analyzes the cards and prints out the category of hand that they represent. poker hands are categorized according to the following labels: straight flush, four of a kind, full house, straight, flush, three of a kind, two pairs, pair, high card. to simplify the program we will ignore card suits, and face cards. the values that the user inputs will be integer values from 2 to 9. when your program runs it should start by collecting five integer values from the user and placing the integers into an array that has 5 elements. it might look like this: enter five numeric cards, no face cards. use 2 - 9.card 1: 8 card 2: 7card 3: 8card 4: 2card 5: 3you must write a function for each hand type. each function must accept a const int array that contains five integers, each representing one of the 5 cards in the hand. the functions should have the following signatures. bool containspair(const int hand[])bool containstwopair(const int hand[])bool containsthreeofakind(const int hand[])bool containsstraight(const int hand[])bool containsfullhouse(const int hand[])bool containsfourofakind(const int hand[])sample would look like this: enter five numeric cards, no face cards. use 2 - 9.card 1: 8 card 2: 7card 3: 8card 4: 2card 5: 7two pair! enter five numeric cards, no face cards. use 2 - 9.card 1: 8 card 2: 7card 3: 4card 4: 6card 5: 5straight! enter five numeric cards, no face cards. use 2 - 9.card 1: 9 card 2: 2card 3: 3card 4: 4card 5: 5high card!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Why is it uncommon for users to perform searches directly in database tables? a.)users are discouraged from interacting directly with tables because they might confuse tables with spreadsheets. b.) users are discouraged from interacting directly with tables because this may result in unintended changes to source data. c.)users do not have the technical skills required to perform searches directly in database tables. d.)users do not have the permissions required to perform searches directly in database tables.
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Text or graphics that print at the bottom of every page are called footings footers headers headings
Answers: 1
question
Computers and Technology, 24.06.2019 16:50
Ideally, the backrest is tilted back slightly, so when you turn the wheel your shoulders are the seat.
Answers: 2
You know the right answer?
Hi i need in my c++ homework. "write a program that reads five cards from the user, then analyzes t...
Questions
question
Mathematics, 28.01.2020 18:09
question
Mathematics, 28.01.2020 18:09
question
History, 28.01.2020 18:09
Questions on the website: 13722359