Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help with the C program, the output should be as same as below When running the program, the user will be asked to enter

please help with the C program, the output should be as same as below

When running the program, the user will be asked to enter an integer number, which will be used as a seed for the generation of random numbers when rolling the dice. Then, your program prints a welcome menu displaying two options:

1) Press 'P' or 'p' to play or

2) Press 'Q' or 'q' to quit.

If the selected option is to play the game, the players should roll the dice (press enter) to determine which player should go first. The player who gets the highest value will go first in the game.

Here is an example output:

HUMAN PLAYER, Press to roll the dice

6 and 2 for a 8

COMPUTER PLAYER, Press to roll the dice

3 and 2 for a 5

HUMAN PLAYER goes first

If there is a tie determining who goes first (i.e. both the Human and Computer roll the same value), a message is printed stating so, and the process is repeated until two different values are rolled. The highest roll then goes first.

image text in transcribed

When running the program, the user will be asked to enter an integer number, which will be used as a seed for the generation of random numbers when rolling the dice. Then, your program prints a welcome menu displaying two options 1) Press 'P' or 'p' to play or 2) Press ' or 'd' to quit. If the selected option is to play the game, the players should roll the dice (press enter) to determine which player should go first. The player who gets the highest value will go first in the game. Here is an example: HUMAN PLAYER, Press to roll the dice 6 and 2 For a 8 COMPUTER PLAYER, Pre33 to roll the dice 3 and 2 For a 5 HUMAN PLAYER goes first If there is a tie determining who goes first (i.e. both the Human and Computer roll the same value), a message is printed stating so, and the process is repeated until two different values are rolled. The highest roll then goes first. When running the program, the user will be asked to enter an integer number, which will be used as a seed for the generation of random numbers when rolling the dice. Then, your program prints a welcome menu displaying two options 1) Press 'P' or 'p' to play or 2) Press ' or 'd' to quit. If the selected option is to play the game, the players should roll the dice (press enter) to determine which player should go first. The player who gets the highest value will go first in the game. Here is an example: HUMAN PLAYER, Press to roll the dice 6 and 2 For a 8 COMPUTER PLAYER, Pre33 to roll the dice 3 and 2 For a 5 HUMAN PLAYER goes first If there is a tie determining who goes first (i.e. both the Human and Computer roll the same value), a message is printed stating so, and the process is repeated until two different values are rolled. The highest roll then goes first

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

Physical pain and eudaimonic wellbeing.

Answered: 1 week ago

Question

What is the effect of word war second?

Answered: 1 week ago