SOLVE IN C PROGRAMMING LANGUAGE Q # 4. Illustrate your knowledge of C-Programming by implementing a 'Game of Dice'. User will start with 3 lives and 100 initial points. Program will ask the user to...

Solve in c programming language.
SOLVE IN C PROGRAMMING LANGUAGE<br>Q # 4.<br>Illustrate your knowledge of C-Programming by implementing a 'Game of Dice'. User will<br>start with 3 lives and 100 initial points. Program will ask the user to roll three dices. If sum of<br>three dices is more than or equal to 15, user will get 10 points.<br>If sum is in the range 10 to 14, user will get 5 points. If sum is less than 10, user will get -10<br>points. If sum is 3, user will lose one life.<br>For every increase of 50 points, user will get one new life and for every decrease of<br>50 points, user will lose one life. If at any point, user has 200 or more points, program will<br>display message, Congratulations, You Win!!!' and end. If user has zero lives or zero points,<br>program will display the message Game Over. Sorry, You Lose.' and end.<br>Program will use the following user defined functions to implement the game<br>Function DisplavGameRules0' will display the following message on screen.<br>ROLL<br>the<br>DICE<br>GAME<br>HELLO USER, LETS PLAY THE DICE GAME.<br>YOU HAVE 3 LIVES AND 100 POINTS<br>START THE GAME BY ROLLING THREE DICES<br>Function will not take any input arguments and will return nothing.<br>Function RolltheDice) will generate 3 random numbers to represent outcome of three dices.<br>Function will return the 3 generated numbers.<br>Function ComputeAndDisplayGameStats0' will take the dice outcome, user points and<br>lives as input and update user points and lives according to the rules described above. After<br>updating user points and lives, function will display user points and lives on the screen.<br>Next, program will ask the user, 'Do you want to roll again?

Extracted text: SOLVE IN C PROGRAMMING LANGUAGE Q # 4. Illustrate your knowledge of C-Programming by implementing a 'Game of Dice'. User will start with 3 lives and 100 initial points. Program will ask the user to roll three dices. If sum of three dices is more than or equal to 15, user will get 10 points. If sum is in the range 10 to 14, user will get 5 points. If sum is less than 10, user will get -10 points. If sum is 3, user will lose one life. For every increase of 50 points, user will get one new life and for every decrease of 50 points, user will lose one life. If at any point, user has 200 or more points, program will display message, Congratulations, You Win!!!' and end. If user has zero lives or zero points, program will display the message Game Over. Sorry, You Lose.' and end. Program will use the following user defined functions to implement the game Function DisplavGameRules0' will display the following message on screen. ROLL the DICE GAME HELLO USER, LETS PLAY THE DICE GAME. YOU HAVE 3 LIVES AND 100 POINTS START THE GAME BY ROLLING THREE DICES Function will not take any input arguments and will return nothing. Function RolltheDice) will generate 3 random numbers to represent outcome of three dices. Function will return the 3 generated numbers. Function ComputeAndDisplayGameStats0' will take the dice outcome, user points and lives as input and update user points and lives according to the rules described above. After updating user points and lives, function will display user points and lives on the screen. Next, program will ask the user, 'Do you want to roll again?". If the user enters 'y' or Y', game will repeat, otherwise the program will end.
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here