cpp_utils/zufallszahlen.cpp

7 lines
234 B
C++
Raw Normal View History

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;
}