Question: I just need a help in this C++ PROGRAM 4.12 Assignment Part 3: Dice Roller III Yes, we are back rolling dice combos for our

 I just need a help in this C++ PROGRAM 4.12 AssignmentPart 3: Dice Roller III Yes, we are back rolling dice combos I just need a help in this C++ PROGRAM

4.12 Assignment Part 3: Dice Roller III Yes, we are back rolling dice combos for our Dungeons and Dragons games! This time however, now that we have loop constructs in our toolbox, we can write a more useful program with fewer lines of code. We can also validate the input and re-prompt the user if there's an issue. We'll seed the random number generator with 32767 so our program is compatible with the test scripts. Forever Loops It might be interesting to note that in this case we are using a while (true) loop, and forcing the exit of the loop with a brealk statement. You'll see this style of loop from time to time. Your Mission Your mission, should you choose to accept it, is to fill in the rest of the logic from the starter code below to compute and display the correct output for the user's dice roll designators. Hints 1) If the input is invalid, skip forward with a continue statement. 2) Test for 4, 6, 8, 10, 12 with 'min, max, and "mod" conditions. 3) Use a for loop for both summing the result and printing the values. Sample Output Enter dice throw designators.. # dice: 1 to 8, # sides: 4, 6, 8, 10, 12 e.g '2d6', or'0' to quit > 2d6 2d6 result: 2+ 6-8 >1d8 1d8 result: 6-6 > 8d12 8d12 result: 11 +8+11 27+8+ 11 11-69 3d3 Invalid Designator >4x6 Invalid Designator 4d6 4d6 result:3 15+ 5-14

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!