Closed

C++ program

Simulation represents a vital and widespread application for computers. In particular, simulating events that have a random component is an excellent way to understand and predict various kinds of systems that could include drought, weather, nuclear weapons, power usage, network traffic, disease spread, and a lot more.

This lab simulates dice rolling and also gives experience outputting data to a file for analysis by other software, Excel (or similar spreadsheet programs).

For this lab, an event is the roll of two identical but independent dice. Each die can have from 3 to 9 sides. A trial is some number of dice rolls. Example output is at the end. Here are the specifications for this lab:

• Input the following three unsigned int values:

o rSeed seed for the random number generator

o numTrials number of trials to run in the interval [1, 1000]

o numSides number of sides per die in the interval [1, 9]

• Loop for numTrials (a while loop might be useful here.) For each trial:

o roll each die until doubles are rolled. Doubles means that both die show the same number.

o If doubles are not rolled, (doubles means that both die show the same number) add the value rolled on the two dice together and keep a running score for this trial. The roll again

o If doubles are rolled, output to a file the number of rolls and the score for the trial. Note, if doubles are rolled on the first roll, then that counts one roll with a total equal zero. The output, on one line, should be: the number of rolls, a comma, the score. Output file in your ClionProjects folder. Name the file: DiceSimOut.csv. Note: this is a comma delimited file.

• For all trials in total, keep track of the total number of rolls as well as how many times a particular sum of two die appears. E.g., for 6-sided die, there are 10 possible sums. Output the total number of rolls to the console. Output the count of each sum to the console. This represents a histogram of the various possible sums.

• Run a trial with rSeed = 199873; numTrials = 1000; and numSides = 6. Load the output file into Excel. Make a scatter plot from the data. The x-axis should be the number of rolls. The y-axis should be the score. An example is below for 6-side die and 1,000 trials. The trendline and statistics are not required, but do this if you can.

Skills: C++ Programming

See more: c++ programs examples, c++ programs pdf, c++ basic programs pdf, c++ programs for beginners, c++ programs download, c++ programs with output, c++ program codes, c++ programs list, notice undefined variable _post in c program files easyphp www noura sawssen fichier php on line 2 notice undefined variable _po, port opensource command-line c++ program to pure java, convert open source command-line c++ program to pure java, program simulation memory management, program simulation paging, program simulation paging linux, multilevel queue example program simulation, csma program simulation, php program simulation stocks, perl program read file print line, mips program prompts user enter line input, program simulation toybe

About the Employer:
( 1 review ) Johns Creek, United States

Project ID: #15246811

24 freelancers are bidding on average $111 for this job

freelancerLatino

I love c and c++ since long time ago... I should be a good option... please, let me know the deadline. Best regards! Habilidades y experiencia relevante c, c++ Htos propuestos $133 USD - the job more details...and More

$133 USD in 5 days
(87 Reviews)
6.9
vrcoder

Hi, I'd like to help with this C++ program and the Excel plot. Relevant Skills and Experience I carefully follow the requirements and provide detailed comments for each step. Proposed Milestones $50 USD - Full projec More

$50 USD in 1 day
(89 Reviews)
6.4
hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on client side, using c++ under Windows envir More

$100 USD in 2 days
(69 Reviews)
6.4
dobreiiita

Hello I am C++ expert and interested in this project. I have reviewed the details of the simulation project and confident to handle it perfectly. I will keep codes simple and well documented. Please communicate to d More

$83 USD in 2 days
(172 Reviews)
6.4
$80 USD in 1 day
(137 Reviews)
5.9
$150 USD in 3 days
(103 Reviews)
6.4
asadrana91

I have much experience with programming, haven't looked into the description yet but surely would help if we get to discuss this! Relevant Skills and Experience C++ Proposed Milestones $244 USD - Upon Satisfaction

$244 USD in 3 days
(27 Reviews)
5.5
renardpaul

Hello, expert in C++ programming here. I can implement for you the dice simulation described in your project. The result of the simulation will be saved in a text file that can loaded in Excel where we can represent t More

$250 USD in 3 days
(16 Reviews)
5.4
xzan88

Hi, I have 10 years C++ experience. I have read the entire description. This will be an easy job for me. I am sure I can finish it in a few hours max. Please message me. Relevant Skills and Experience 10 years C++ exp More

$100 USD in 1 day
(64 Reviews)
5.7
$155 USD in 3 days
(9 Reviews)
4.6
$80 USD in 1 day
(30 Reviews)
4.8
$150 USD in 5 days
(5 Reviews)
3.9
Shankarone

I can complete this project in 13 hours. Message me and if you'd want to discuss more about the project or if you'd like me to start working on it :) Also please share the example for 6-side die and 1,000 trials

$111 USD in 0 days
(19 Reviews)
4.1
mehfuza

Dear Client, I'm Computer Engineer and I have experience of programming in C, C++ and Java. I understand your project requirements and I'm interested to work on it. I have coded many programs including data structure, More

$72 USD in 1 day
(11 Reviews)
3.7
liangjongai

< Hi, sir I have a detail look to your project, I have a great skill in c++. I'm sure I can complete your project. My price and period is negotiable. We can discuss the details via chat. Thanks.>

$155 USD in 3 days
(13 Reviews)
3.6
isparrowsolution

Hello hiring manager I read your details and I understand is that you wish to develop program using C++ for simulate the various data or file and analysis by other Excel/spreadsheet programs. Relevant Skills and Expe More

$100 USD in 3 days
(5 Reviews)
3.3
Gerard097

I can finish this project in just a few hours, the extra day is just in case something strange could happen. I'd really appreciate an opportunity to gain some experience in this platform. Habilidades y experiencia rel More

$55 USD in 2 days
(0 Reviews)
0.0
Shahzaada

Hello I have gone through your project description I am highly expert & well experienced c++ programmer . I have 10years of experience & have completed 500+ projects . Relevant Skills and Experience i have good amou More

$50 USD in 3 days
(0 Reviews)
0.0
xinyusoc

A proposal has not yet been provided

$111 USD in 5 days
(0 Reviews)
0.0
gili73

Hi, My name is Gili Levy. I am a software engineer with over 20 years of experience with C/C++. Let's further discuss the details. Regards, Gili Relevant Skills and Experience I am a software engineer with over 20 yea More

$110 USD in 2 days
(0 Reviews)
0.0