zufallszahlen.cpp

Ein Zufallszahlengenerator
This commit is contained in:
Marc Hannebrook 2021-06-14 19:14:12 +02:00
parent ab8211c545
commit eb0df7ee84

7
zufallszahlen.cpp Normal file
View file

@ -0,0 +1,7 @@
cout << "C++11:" << endl;
random_device seed;
mt19937 engine(seed()); // Generator
uniform_int_distribution<long> values(1, 10000); // Verteilung 1-10000
for( size_t i=0; i < 3; ++i) {
cout << values(engine) << endl;
}