Antwort
#include <random>
// ...
using namespace ::std;
mt19937 prng { random_device {} () };
uniform_int_distribution dist { 20, 30 };
auto rand { [] () {
return dist(prng);
} };
// ...
// Zufallszahl zwischen 20 u. 30:
cout << rand() << endl;