fork download
  1. #include <iostream>
  2. #include <random>
  3.  
  4. int main() {
  5. std::mt19937 gen;
  6. std::uniform_int_distribution<int> dist (10, 20);
  7.  
  8. for (int i = 0; i < 100; ++i) {
  9. std::cout << dist (gen) << std::endl;
  10. }
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
18
11
19
19
11
20
20
12
16
13
11
16
13
12
16
20
20
20
20
20
11
17
20
20
20
11
15
18
18
13
11
10
14
11
20
17
18
19
20
15
17
18
10
13
19
12
20
17
17
14
18
18
18
15
14
14
17
11
11
13
17
18
10
13
13
19
10
11
11
20
19
19
17
11
13
18
20
15
10
17
14
11
14
12
18
10
18
10
12
14
15
15
14
15
17
18
17
20
18
18