little math/programming problems April 2023
|
05-02-2023, 08:03 PM
Post: #5
|
|||
|
|||
RE: little math/programming problems April 2023
(04-29-2023 06:50 PM)Allen Wrote:I'm surprised that we came up with such different answers. With 10 million trials, I got an average of 5.49603. Here's my C++ code. Does anyone spot a problem? Maybe this is a case of rand() showing it's limitations? Code: #include<iostream> //Required for cin, cout $ ./foo Enter starting number of dice and number of simulations: 5 10000000 Average of 5.49603 rolls starting with 5 dice |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 14 Guest(s)