Question: Programming language is C++ PA 8-3 (25 points) In Assignment PA 7-2 you wrote a program that rolled a pair of dice. In that program

Programming language is C++

Programming language is C++ PA 8-3 (25 points) In Assignment PA 7-2

PA 8-3 (25 points) In Assignment PA 7-2 you wrote a program that rolled a pair of dice. In that program you determined whether the player won, lost, or was instructed to "roll again" after the first roll of a pair of dice Extend that program as follows -if the player was told to roll again after the first roll (if it was a 4,5,6,8,9,10), save that number, call it "the point". Now continue rolling until one of two things happen -1. if the player rolls a 7 before rolling "the point" number again, the player loses and the turn is over; or 2. if the player matches "the point" before a 7 is rolled the player wins and the turn is over. If any number besides a 7 or "the point" is rolled nothing happens and the player just keeps rolling. Tell the player if they won or lost, the results of each roll, and how many rolls it took to end that player's turn. You may have to review De Morgan's Laws on how to set up "not" ( to get your while or do-while loop to work correctly! Show the number of rolls as shown below i3 D:\CodeBlocks-EP\CodeBlocks-EPVMarsh2050bin) Ro11 1-Your "point" is 8 011 2. 6 011 3. 9 011 4. 5 011 5. 2 o11 6. 2 o11 7.8 You won! D:CodeBlocks-EPlCodeBlocks-EP Marsh2050bin\DebuglMarsh2050.exe Sorry, you lost with a 3 on the first rol1. D:lCodeBlocks-EPICodeBlocks-EP1Marsh20501 bin\DebugiMarsh2050.exe Yea! You won with a 7 on the first roll D:CodeBlocks-EPCodeBlocks-EP Marsh2050bin C 011 1- Your"point" is o11 2. 12 011 4. 2 o11 5. 10 o11 6. 9 o11 7.7 You lost

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!