419 B
419 B
Sets (#2)
Write the function experiment()
to generate random Int
s from 1 through 25
and place the results in a Set
. Discover an approximate value for the minimum
number of randomly-generated Int
s required before the Set
contains all
values 1 through 25. Return this approximate value as a result of the
experiment()
function.
main()
repeats your experiment 1000 times and displays the average result.