Find Jobs
Hire Freelancers

Dice

$25-30 USD

Completed
Posted almost 20 years ago

$25-30 USD

Paid on delivery
**Due Friday, June** **25** Design and implement a Visual C++ .NET program that simulates rolling a pair of standard six-sided dice as described below. Consider this experiment: Roll two dice and remember their sum (this is called the target sum). Repeatedly toss the two dice again until the same target sum reappears. Count the total number of times the two dice are tossed, including the initial and final tosses that both yield the target sum. The minimum possible number of tosses is two in any trial of this experiment. Your program should first prompt the user to enter the number of times to try the above experiment, and then repeat this experiment the specified number of times. For each possible target sum (2 through 12), print the number of trials that used this particular target sum, and also print the average number of tosses that were made during the trials which used this target sum. Arrange these results in tabular form as shown in the sample runs below. _**Clarification and example**_**_:_** Each trial of the experiment consists of rolling two dice to obtain a target sum, and then continuing to roll the dice until the same target sum reappears. So a single trial consists of at least two dice rolls, and likely more than two dice rolls. The number of trials is specified by the user. Suppose the user specifies 2 trials, and this sequence of tosses occurs: Trial 1: 7 10 5 7 (4 tosses) Trial 2: 7 4 9 8 6 4 11 10 7 (9 tosses) So for the target sum 7, the number of trials is 2, and the average number of tosses is (4+9)/2 = 6.5 The only libraries that may be included for this project are <iostream>, <cstdlib>, and <ctime>. Seed the random number generator so that different results are obtained on each run. Do NOT use any arrays. Here are three sample runs: <[login to view URL]> ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): ## Platform Windows C++.net
Project ID: 3257157

About the project

25 proposals
Remote project
Active 20 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$5 USD in 1 day
5.0 (36 reviews)
4.9
4.9
25 freelancers are bidding on average $12 USD for this job
User Avatar
See private message.
$25.50 USD in 1 day
5.0 (28 reviews)
6.5
6.5
User Avatar
See private message.
$8.50 USD in 1 day
5.0 (64 reviews)
6.0
6.0
User Avatar
See private message.
$21.25 USD in 1 day
5.0 (51 reviews)
5.3
5.3
User Avatar
See private message.
$17 USD in 1 day
5.0 (105 reviews)
5.3
5.3
User Avatar
See private message.
$21.25 USD in 1 day
5.0 (14 reviews)
4.1
4.1
User Avatar
See private message.
$8.50 USD in 1 day
5.0 (12 reviews)
3.5
3.5
User Avatar
See private message.
$12.75 USD in 1 day
5.0 (42 reviews)
3.7
3.7
User Avatar
See private message.
$10.20 USD in 1 day
5.0 (31 reviews)
3.7
3.7
User Avatar
See private message.
$7.65 USD in 1 day
5.0 (29 reviews)
3.5
3.5
User Avatar
See private message.
$6.80 USD in 1 day
5.0 (7 reviews)
3.0
3.0
User Avatar
See private message.
$17 USD in 1 day
5.0 (13 reviews)
2.7
2.7
User Avatar
See private message.
$8.50 USD in 1 day
5.0 (7 reviews)
2.4
2.4
User Avatar
See private message.
$8.50 USD in 1 day
5.0 (8 reviews)
2.4
2.4
User Avatar
See private message.
$3.40 USD in 1 day
5.0 (4 reviews)
1.7
1.7
User Avatar
See private message.
$18.70 USD in 1 day
4.7 (4 reviews)
1.1
1.1
User Avatar
See private message.
$8.50 USD in 1 day
4.5 (1 review)
0.3
0.3
User Avatar
See private message.
$6.80 USD in 1 day
5.0 (1 review)
0.5
0.5
User Avatar
See private message.
$17 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$8.50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$12.75 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
4.9
7
Member since Jun 14, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.