Question: This is what I got. below is my code. PLEASE FIX IT CORRECTLY. #include #include #include #include using namespace std; const int PLAYER1 = 0;

 This is what I got. below is my code. PLEASE FIXIT CORRECTLY. #include #include #include #include using namespace std; const int PLAYER1

This is what I got.

below is my code.

PLEASE FIX IT CORRECTLY.

#include #include #include #include

using namespace std;

const int PLAYER1 = 0; const int PLAYER2 = 1; const int WINNING_SCORE = 100;

//FIXME (1): Implement the printIntro function void printIntro(){ cout > rollAgain; cout > rollAgain; cout

int main() { srand(4444);

// setup and initialize variables int turn = PLAYER1; int player1score = 0; int player2score = 0; string player1name; string player2name; printIntro();

// FIXME (2): get names of players cout > player1name; cout > player2name; cout

//play game while (player1score

//player 1's turn or player 2's turn if (turn == PLAYER1) { player1score = humanTurn(player1name, player1score); turn = PLAYER2; } else { player2score = humanTurn(player2name, player2score); turn = PLAYER1; } } // FIXME (7): Output who won the game if(player1score >= WINNING_SCORE){ cout

return 0; }

6: Compare output Charles Ada Y Y Y Y Y n Input y n y y y y y y y y y y y y y y y Charles You rolled a 6 Your score: 90 Do you want to roll again? (y) Charles You rolled a 3 Your score: 93 Do you want to roll again? (y) Charles Your output ends You rolled a 4 with Your score: 97. Do you want to roll again? (y) a J Charles You rolled a 2 Your score 99 Do you want to roll again? (y) J Charles

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!