Question: C++ help with dirty dice game? I started the code and this is what i have so far if that helps 6 using namespace std;

C++ help with dirty dice game? I started the code and this is what i have so far if that helps

C++ help with dirty dice game? I started the code and thisis what i have so far if that helps 6 using namespace

6 using namespace std; 7 8 int playerlpts-100; 9 int player2pts-100; 10 int turntotal; 11 int decision-1; 12 13 int turn rand ( ) % 2 + 1 14 15 cout>winningvalue; 17 18 int over#0 ; 20 int roll- 21 22 int main 24 while (lover) 23 25 26 27 28 coutsc"would you like to roll(1) or hold (2)2: ">decision; while(decision-1) 31 32 roll-rand ( ) % 6 + 1 ; turntotal-roll+turntotal; 34 cout>decision; if decision-2 if turn-1 playerlpts-playerlpts+turntotal; if turn 2 player2pts-player2pts+turntotal; 45 46 if playerlpts-winningvalue over:l: 48 49 50 if player2pts-winningvalue over:l: 52 53 54 if turn-1 turn++ if turn=2 turn- turntotal#0; 57 58 6 using namespace std; 7 8 int playerlpts-100; 9 int player2pts-100; 10 int turntotal; 11 int decision-1; 12 13 int turn rand ( ) % 2 + 1 14 15 cout>winningvalue; 17 18 int over#0 ; 20 int roll- 21 22 int main 24 while (lover) 23 25 26 27 28 coutsc"would you like to roll(1) or hold (2)2: ">decision; while(decision-1) 31 32 roll-rand ( ) % 6 + 1 ; turntotal-roll+turntotal; 34 cout>decision; if decision-2 if turn-1 playerlpts-playerlpts+turntotal; if turn 2 player2pts-player2pts+turntotal; 45 46 if playerlpts-winningvalue over:l: 48 49 50 if player2pts-winningvalue over:l: 52 53 54 if turn-1 turn++ if turn=2 turn- turntotal#0; 57 58

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!