0

C++ Is there a different way to format random numbers between 2 numbers?

the book I'm using only gave me 2 examples but they both use the remainder(%). I know in MATLAB there were specific terms to easily state the max and min (range), so I was wondering if c++ have something similar.

30th Jun 2018, 8:31 PM
DerpyCoco
DerpyCoco - avatar
2 Réponses
+ 4
You can have a look at the #include <random> library There is something like std::uniform_int_distributiom<int> distribution(1,6)
30th Jun 2018, 8:44 PM
Matthias
Matthias - avatar
30th Jun 2018, 8:51 PM
Kevin Eldurson
Kevin Eldurson - avatar