Question: please write c program to answer this question Lab3 Wed docx Open with the dice game with the following rules (sce tlowcnart below). He/she gets

please write c program to answer this question  please write c program to answer this question Lab3 Wed docx

Lab3 Wed docx Open with the dice game with the following rules (sce tlowcnart below). He/she gets startod with the code but needs your help in fixing errors and complete the code (see Incomplete code with errors in lab3pl.c file) such that the d dice game is implemented correctly Red entered by a user 1) Get the lab3plc file from your TA and fix errors | Sample #1: such that a) it can display the sum of two dices and b) ask whether a user wants to play a new game. Let's play Dice Game Roll # 1 Sum of two Dice is 6 a user wants to stop after the first 2) Implement the dice game shown in Figure 1. YourRoll again (y or n)?nroll game MUST use the given user-defined functionsPlay another game iq to quit)? q in lab3pl.c (0 point for this problem if not) and be interactive. See sample code execution. Note: With rand0 used for rolling the dices, your code will generate different results compared with Sum of two Dice is 11 the given sample code. However, the rule of theyou win! game should be correctly applied). Sample #2: Let's play Dice Game Roll # 1 Win after the first roll Play another game (q to quit)? y Roll # Sum of two Dice is 6 Roll again (y or n)? y Roll # 2 Sum of two Dice is 2 Roll again (y or n)? y Roll # 3 Sum of two Dice is 7 you lose! Play another game (q to quit)? y Figure 1: Flowchart for the dice game Roll Dice Lose since sum = 7 after several rolls Yes Sum-7 or 11 No Yes Sum 2, 3 or 12 Roll # 1 Sum of two Dice is 4 Roll again (y or n)? y Roll #2 Sum of two Dice is 12 Roll again (y or n)? y store Sum in Point Roll Dice No | Roll# 3 Sum Point Sum of two Dice is 9 Roll again (y or n)? y Roll # 4 Sum of two Dice is 4 Point is 4, you win! Win since sum Point (4 from the FIRST rolil) after veral rolls Play another game (g to quit)? Game End Page 1 Type here to search

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!