1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aliina [53]
3 years ago
5

Write a Dice Game program that generates two random dice values between 1 and 6 for you, and 2 for the computer. You get to roll

as many times as you like (if you don't like your 2 dice), while the computer only rolls once, after you have decided that you like your two dice. Determine who wins, you or the computer. g
Computers and Technology
1 answer:
charle [14.2K]3 years ago
6 0

Answer:

#include <iostream>

#include <time.h>

#include <string>

using namespace std;

int main(){

srand(time(NULL));

cout<<"Throw dice"<<endl;

int b =0;

int a=0;

a=rand()%6;

b=rand()%6;

for (int i =0;i<1;i++)

{cout<<"dice one: "<<a<<endl;}

for (int i =0;i<1;i++)

{cout<<"dice two: "<<b<<endl;}

if(a>b)

{cout<<"first dice won"<<endl;}

if(b>a)

{cout<<"second dice won"<<endl;}

else{cout<<"they are same"<<endl;

return main();

}

return 0;

}

Explanation:

/*maybe it help you it is almost done*/

You might be interested in
Drag each tile to the correct box. (No links please)
kenny6666 [7]

Answer:

James lets Dan and Andy express their individual opinions in an open manner

James encourages Dan and Andy to offer a solution

James discusses all the solutions and decides on the one that satisfies everyone.

James encourages Dan and Andy to work together.

Explanation:

im not actually sure if this is correct but maybe this helped

3 0
3 years ago
Read 2 more answers
If the horizon is sloping, it is a good sign that the photograph is not straight. True False
kiruha [24]

Answer:

the answer is false

Explanation:

hope this helps

8 0
3 years ago
Your company has merged with another company that also uses Windows Server 2016 and Active Directory. You want to give the other
LiRa [457]

Answer:Creation of two-way forest trust

Explanation: In active directory, Two way forest trusty is the two way trusting condition where one forest trust the other forest and it works same for both forest.The forest domain of one forest is reliable and have trusty relationship with the other forest and vice-versa.

This function of the forest helps all the users to reliably access all the components of both the domains.Thus two-way forest trust should be created between the two organization mentioned in the question.

5 0
3 years ago
Juan plans on using an algorithm to make cookies. What is the step that he should follow immediately after he makes the cookies?
Evgen [1.6K]

The step that Juan should follow immediately after he makes the cookies is to review his experience.

<h3>What is algorithm?</h3>

An algorithm is known to be the way used for handling a problem or carrying out a computation.

Note that The step that Juan should follow immediately after he makes the cookies is to review his experience as he will be able to know if his algorithm  is correct or not.

Learn more about algorithm from

brainly.com/question/25978728

#SPJ1

7 0
2 years ago
7.8 LAB: Palindrome A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob,
leonid [27]

Answer:

word = input("Write a word: ").strip().lower()

without_space = word.replace(" ","")

condition = without_space == without_space[::-1]

print("Is %s palindrome?: %s"%(word,condition))

6 0
3 years ago
Other questions:
  • I need help pls, in this code if add row for example :
    8·1 answer
  • Why are video games interesting?
    5·1 answer
  • The disk drive is a secondary storage device that stores data by _____ encoding it onto a spinning circular disk.
    14·1 answer
  • Which of the following works did mozart NOT write? A.the surprise symphony B. the magic flute C. eine kleine nachtmusik
    13·2 answers
  • Which component manages the flow of data between parts of a computer
    14·1 answer
  • A computer may keep freezing if it's software is up-to-date? <br> True <br> False
    11·1 answer
  • What does it mean to say that a graph is complete?
    14·1 answer
  • How do i get the schools admin password for the good wifi
    10·2 answers
  • Explain the working principal of computer system with suitable diagarm​
    9·1 answer
  • which one of the following portfolios cannot lie on the efficient frontier as described by markowitz? portfolioexpected returnst
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!