MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / problem_24

Function problem_24

examples/99_problems.cpp:193–196  ·  view source on GitHub ↗

P24 (*) Lotto: Draw N different random numbers from the set 1..M.

Source from the content-addressed store, hash-verified

191
192// P24 (*) Lotto: Draw N different random numbers from the set 1..M.
193void problem_24()
194{
195 print_result(sample(std::random_device()(), 3, numbers<int>(1, 100)));
196}
197
198// P25 (*) Generate a random permutation of the elements of a list.
199void problem_25()

Callers 1

mainFunction · 0.85

Calls 2

print_resultFunction · 0.85
sampleFunction · 0.50

Tested by

no test coverage detected