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
Displays information a bout drivers, network connections, and other program-related details.
slava [35]

Answer:

library

Explanation:

hope you like it

6 0
3 years ago
When an attacker promotes themselves as reputable third-party advertisers to distribute their malware through the Web ads,
pshichka [43]

Answer:

This type of attack is called Malvertising

Explanation:

Malvertising (Malware Advertising)  is a term in computer security that refers to the act of spreading computer malware through online advertisements. It is done by injecting malicious code into genuine online advertisement platforms or malicious webpages that appear as though they are genuine and from reputable third-party advertisers. While it is quite a new concept it is difficult to combact because content for advertisement can be placed in genuine and reputable websites that users trust.

3 0
3 years ago
A computer memory that acts as the main storage available to user for programs and data
Gelneren [198K]

Answer:

Primary storage. Primary storage (also known as main memory, internal memory, or prime memory), often referred to simply as memory, is the only one directly accessible to the CPU.

3 0
2 years ago
What is the answer to this question?
Ivan

5

8

<u>Explanation:</u>

<u></u>

Since the number is already defined as 5, greater_than_zero holds the value true and less_than_zero holds the value false because 5 is greater than zero and not less than 0. Since there are 4 four if conditions, only two holds true i.e the first one and the last one because the in third condition we are using and logic which needs both condition to be true to make the condition true, whereas in fourth we are using or logic which can make condition true even if one condition is true. Hence the number printed will be number and number +3.

6 0
3 years ago
CONVERT .0001 KILOMETERS TO MILLIMETERS
Trava [24]

Answer:

The answer to this question is given below in the explanation section

Explanation:

As we know that

1 km = 1000000 mm

So, 0.001 * 1000000 =  100

the answer is 100 millimeters.

7 0
3 years ago
Other questions:
  • How long can a lightning last
    13·1 answer
  • Please answer this I know that no one else does but I can't think right now
    10·1 answer
  • Which part of the computer contains logic circuity which interrupts instructions from a program​
    15·1 answer
  • A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
    6·1 answer
  • Use the function random.randint to write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.
    8·1 answer
  • Write the Flowchart to find Even number between 1 to 50<br>​
    9·1 answer
  • The difference between page break and section brek​
    5·2 answers
  • Hello i need help whats -5 = 500
    13·2 answers
  • Which of the following statements about ip addresses is true?
    5·1 answer
  • An online bank wants you to create a program that shows prospective
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!