Code geändert

This commit is contained in:
Marc 2021-06-16 12:04:03 +02:00
parent ca5e4c0eca
commit 134441ff83
1 changed files with 17 additions and 7 deletions

View File

@ -1,7 +1,17 @@
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;
#include <iostream>
#include <cstdlib>
#include <ctime>
using std::cout;
using std::endl;
inline void zufallszahl()
{
cout << RAND_MAX << endl;
srand((unsigned int) time(0));
for(int i=1; i<=20; i++){
cout << rand() % 6 +1 << " ";
cout << endl;
}
}