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
What are entity-relationship diagrams and how are they used? What symbol is used for a relationship? What is an associative enti
castortr0y [4]

Answer:

The definition including its given problem is outlined in the following segment on the clarification.

Explanation:

  • Entity-relationship (ER) diagram describes how mechanical stored procedures are constructed and demonstrate the overarching representation of the situation. It also describes the connections between some of the entities of the framework and even the comparison with standard measurements.
  • For something like an individual relationship structure, the normal representation of connections seems to be a diamond. Associative institutions have several to many partnerships to communicate with. It's indeed the verb throughout a diamond-shaped form that holds two organizations around each other. This verb is in fact an entity on its own, therefore it must be termed an associative entity.
  • An illustration of such might be if a participant were to register for a class. Multiple individuals will be registered for several courses, and there have been many to several relationships; thus, the associative object will indeed register.
4 0
3 years ago
Kristen wants to view the records of her database in ascending order. What should she do?
Elanso [62]

the answer is Sort the table

6 0
3 years ago
Read 2 more answers
Assume that the client wants to retrieve the www.cnn home page but has no information about the www.cnn web server IP address. D
liberstina [14]

Answer:

You could type<em> ipconfig www.cnn</em> in command promt.

Explanation:

4 0
3 years ago
Describe how keyboard software works and which problems does keyboard software<br> need to handle?
Anastaziya [24]

Answer:

The target computer's operating system and gain unauthorized access to the hardware, hook into the keyboard with functions provided by the OS, or use remote access software to transmit recorded data out of the target computer to a remote location.

No physical sensation of pressing a button results in misfires. Lack of physical divisions between keys makes touch typing impossible. Smaller key spacing results in typos.

3 0
3 years ago
How to delete a bucket in microsoft planner
katrin2010 [14]
You can just click file and delete
7 0
4 years ago
Other questions:
  • What is the term for the process of gathering information through images taken at a distance?
    13·1 answer
  • Playstation 4 how to change mtu settings
    12·1 answer
  • Mention<br>any<br>5<br>indicators of<br>happiness​
    11·2 answers
  • Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
    8·1 answer
  • 1. If this traffic signal is turned on after the red light, it means you may cross the intersection, but you _______ wait until
    12·2 answers
  • High-end tools in project management software have enterprise and _____ functions that summarize and combine individual project
    9·1 answer
  • Name the three basic storage device of a computer​
    6·2 answers
  • Sketch f(x) = 5x2 - 20 labelling any intercepts.​
    13·1 answer
  • Please anyone, help me.... I'm not sure how to put these all together.<br> 35 points!
    15·2 answers
  • An IP address specifically belongs to:
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!