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, 21.06.2019 18:30
Which number on the image above correctly indicates the name of a folder in this url? a.1b.2c.3d.4
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 22.06.2019 14:10
Dean wants a quick way to look up staff members by their staff id. in cell q3, nest the existing vlookup function in an iferror function. if the vlookup function returns an error result, the text “invalid staff id” should be displayed by the formula. (hint: you can test that this formula is working by changing the value in cell q2 to 0, but remember to set the value of cell q2 back to 1036 when the testing is complete.)
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
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
English, 24.10.2019 01:50
question
Mathematics, 24.10.2019 01:50
question
History, 24.10.2019 01:50
question
Mathematics, 24.10.2019 01:50
question
Mathematics, 24.10.2019 01:50
question
Social Studies, 24.10.2019 01:50
Questions on the website: 13722367