Help me put this into code please [C++]


Create a dice roll and a card game where you pick the number of players. Each player rolls 2 dice and the sum of the 2 will be the number of cards that they draw. The sum of their cards will determine if they win or lose. At the end have it ask if you would like to play again. the output should look like this

Number of player: 2
Player 1- Dice 1: 4 Dice 2: 2
Sum of dice: 6
Cards drawn: 1, 8, 6, 10, 5, 2
Sum of cards: 32
Player 2- Dice 1: 6 Dice 2: 1
Sum of cards: 7
Cards drawn: 2, 3, 8, 9, 2, 1, 10
Sum of cards: 37
Winner is Player 2!
Would you like to play again?(Y/N): N
<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>


Replace this line with your code.

<do not remove the three backticks above>

Please help C++ code

Hey, the purpose of exercises is for you to go through the process of solving it yourself.

This isn’t really asking for help, it’s asking for someone to do it all for you, entirely defeating the purpose of your exercise - what good has the person “helping” you then done?

What you’ll need to do is to figure out what the program needs to be doing, split it up into small steps which add up to what you described.

You can start by just writing comments. Write out in English what’s supposed to happen to get the above done.

Then fill in the code for each such comment, one at a time. If you don’t know how to implement something very specific then you’ve got something that you can ask about. However, better yet for everyone is if you google how to do that thing, I promise others will have asked it, and if not exactly the same thing, then it’s up to you to rephrase your question into something more generic which has been asked, that’s how you look those things up, that’s something we all do every 5 minutes while writing code because we’re often working in unfamiliar territory and the skill then is not to already know it all but to be able to find the information we need.


Please i just want to know how to do it and i will learn from it then.

Generalize. Look up examples for similar stuff, apply to what you want to do.

I am just trying to show my friend that there are people out here to help please just help me with the code

Your friend will have to conclude that delegating your exercises to others doesn’t pan out.



int main() {
std::cout << “Do it yourself” << std::endl;
return 0;