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]
2 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]2 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
A____consists of many users and their information.​
grin007 [14]

<u>Active Directory</u> consist of many users and their information.

7 0
1 year ago
Read 2 more answers
What is the device called which typically combines the capabilities of a scanner, printer, fax, and copying machine?
maria [59]
The device which typically combines the capabilities of a scanner , fax ,and copying machine is called an input device.
5 0
3 years ago
Adding transitions to slides in a presentation.
8090 [49]

B.) The addition of slide transitions

4 0
3 years ago
Read 2 more answers
How long would you need to work at McDonalds to earn enough money to buy a optiplex 3050, monitor, mouse and keyboard all from d
r-ruslan [8.4K]
So assuming you were buying this piece of trash with the mouse and keyboard it would be around $450. Average pay per hour is $9.10-$10.20 depending on were you live so we will just say $9.50. You'd need to work rougly 47 hours (without taxes) So i'd say 65-75 Hours.
8 0
3 years ago
Read 2 more answers
TO COMPUTING IN BUSINE
Diano4ka-milaya [45]

Answer:

<em>the</em><em> </em><em>correct</em><em> </em><em>answer</em><em> </em><em>is</em><em> </em><em>a.</em><em> </em><em>Word</em><em> </em><em>processing</em><em>.</em>

Explanation:

<em><u>hope</u></em><em><u> </u></em><em><u>this</u></em><em><u> </u></em><em><u>works</u></em><em><u> </u></em><em><u>out</u></em><em><u>!</u></em><em><u>!</u></em><em><u>!</u></em><em><u>!</u></em><em><u>!</u></em>

5 0
3 years ago
Other questions:
  • Which of the following is a full selector?
    12·1 answer
  • An is auditor reviewing a network log discovers that an employee ran elevated commands on his/her pc by invoking the task schedu
    10·1 answer
  • What helped Taylor through her tough time with being bullied
    7·1 answer
  • You recently started working part-time in a retail store, and are learning about the reading devices your store uses. Your store
    10·1 answer
  • 20 points
    6·2 answers
  • All of the following changes have created an urgent need for centralization except: Select one: a. The Internet boom inspired bu
    7·1 answer
  • Write JavaScript code to declare a variable of the name favoriteColor
    13·1 answer
  • Write down a pair of integers whose sum is​ 0
    5·1 answer
  • How is primary storage different from secondary storage? Select the TWO correct statements. The CPU can only read and write data
    12·2 answers
  • Do you need a separate password for each slack channel
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!