无法计算C ++骰子程序中的百分比 [英] Trouble calculating percentage in C++ dice program

查看:56
本文介绍了无法计算C ++骰子程序中的百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个程序,必须将骰子A和骰子B滚动一百万次,并计算死亡次数相等的百分比。


我很难弄清楚这个百分比是如何运作的。


这是我的代码:

I''m writing a program that will have to roll the dice A and dice B one million times, and calculate the percentage of times that the dies will be equal.

I''m having trouble to figure out how the percentage will work.

Here is my code:

展开 | 选择 | Wrap | 行号

推荐答案

展开 | 选择 < span class =codeDivider> | Wrap | 行号


展开 | 选择 | Wrap | 行号


非常感谢,

那是非常快的,


我会尝试现在,让你们知道发生了什么。


Doug
Thank you so much,
That was very fast,

I will try that right now and let you guys know what happened.

Doug


这篇关于无法计算C ++骰子程序中的百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆