Last active
October 23, 2016 19:42
-
-
Save illescasDaniel/2d3aa5a6e76f982c6517cc6ba1d86293 to your computer and use it in GitHub Desktop.
Throw dice [C++]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <random> | |
using namespace std; | |
int main() { | |
random_device rd; | |
mt19937 rng(rd()); | |
uniform_int_distribution<> dice(1, 6); | |
cout << dice(rng) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment