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
For any two documents x and z, define k(x, z) to equal the number of unique words that occur in both x and z (i.e., the size of
mars1129 [50]

Answer:

Yes, the function k(x,z) is a kernel

Explanation:

To show that k(x,z) is a kernel.

First, we'll need to explicitly construct two features of k(x,z).

The features are:

vector φ(x) and vector φ(z) in such a way that K(x,z) =φ(x)·φ(z).

Then, we proceed to the next step...

For any given documents, a vocabulary V can be constructed.

Vocabulary V is finite size for the words in the document set.

Given V, a feature mapping φ(x) can then be constructed for x by the following:

For the kth word wk in V, if wk appears in document x, assign φ(x) k(the kth element of φ(x)) to be 1; else assign 0 to it.

Then the number of unique words common in x and z is φ(x)·φ(z).

This gives us the kernel.

8 0
3 years ago
A _____ utilizes standard business software, such as Microsoft Word or Microsoft Excel, which has been configured in a specific
Vera_Pavlovna [14]

Answer:

User application

Explanation:

A user application is a program that is created by using a standard software that is adjusted to the user's needs that can't be fulfilled by an existing system. According to this, the answer is that a user application utilizes standard business software, such as Microsoft Word or Microsoft Excel, which has been configured in a specific manner to enhance user productivity.

7 0
3 years ago
The grade of a metric bolt is designated by
Andre45 [30]
The answer to your question is The grade of a metric bolt is designated by the number stamped on the head of the bolt.
5 0
3 years ago
Which two statements show cultural effects of computers and the Internet?
padilas [110]

Answer:

I think it is A,  Melissa says "LOL" instead of laughing at a joke her friend told.

5 0
3 years ago
A folder has been shared with other users and set to read-only. What does this mean for users?
In-s [12.5K]
Users is what people use on the computer.
Its means that other people get to only read your folder.
5 0
3 years ago
Read 2 more answers
Other questions:
  • A Chief Information Officer (CIO) recently saw on the news that a significant security flaws exists with a specific version of a
    5·1 answer
  • The development team recently moved a new application into production for the accounting department. After this occurred, the Ch
    7·1 answer
  • I have to writea piece of code to calculate the factorial of somewhat large numbers so the long long type won't suffize, so usin
    7·1 answer
  • Which statement best expresses the use of Internet sources in a research project versus other types of sources?
    14·1 answer
  • WHAT is the USE OF RIBBON TAB​
    10·1 answer
  • You are the administrator for a small network with several servers. There is only one printer, which is centrally located. Altho
    10·1 answer
  • 4. Use the information under the Nutrients That the Human Body Needs title to create a multilevel list. Your list should meet th
    8·2 answers
  • Which pair of devices have the same input motion and different outputs?
    15·1 answer
  • Which of these statements is true?
    9·1 answer
  • Write a loop that continually asks the user what pets the user has until the user enters rock in which case the loop ends. It sh
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!