1 2 3 4 5 6 7 8 9 10 11 12
#include <cstdio> #include <random> int main() { std::random_device random; std::mt19937 mt(random()); std::uniform_real_distribution<double> uniform(-100, 100); std::printf("random value: %lf\n", uniform(mt)); }