Find Jobs
Hire Freelancers

Dice conrep

₹600-1500 INR

已关闭
已发布超过 8 年前

₹600-1500 INR

货到付款
**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
项目 ID: 8159593

关于此项目

远程项目
活跃9 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
用户头像
I can do this project very easily. I will make sure you will get a good completed project in low cost. I am negotiable , can negotiate through private message if you want.
₹1,250 INR 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

INDIA的国旗
India
0.0
0
会员自7月 28, 2015起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。