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, 22.06.2019 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 22.06.2019 12:50
You have just been hired as an information security engineer for a large, multi-international corporation. unfortunately, your company has suffered multiple security breaches that have threatened customers' trust in the fact that their confidential data and financial assets are private and secured. credit-card information was compromised by an attack that infiltrated the network through a vulnerable wireless connection within the organization. the other breach was an inside job where personal data was stolen because of weak access-control policies within the organization that allowed an unauthorized individual access to valuable data. your job is to develop a risk-management policy that addresses the two security breaches and how to mitigate these risks.requirementswrite a brief description of the case study. it requires two to three pages, based upon the apa style of writing. use transition words; a thesis statement; an introduction, body, and conclusion; and a reference page with at least two references. use a double-spaced, arial font, size 12.
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
When creating a field in a table, you must set the to determine what type of data the field can store. field property data type field type data property
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
Mathematics, 09.04.2020 23:19
Questions on the website: 13722361