This language bar is your friend. Select your favorite languages!

Idiom #69 Seed random generator

Use seed s to initialize a random generator.

If s is constant, the generator output will be the same each time the program runs. If s is based on the current value of the system clock, the generator output will be different each time.

#Edit dateEdit SummaryEditor
👁 Δ 37 2019-09-30, 05:53 New Cpp implementation by user [trueKvothe] trueKvothe
👁 Δ 36 2019-09-27, 22:40 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 35 2019-09-26, 20:44 New Lisp implementation by user [tkoenig] tkoenig
👁 Δ 34 2019-09-26, 19:14 New Csharp implementation by user [bluesky] bluesky
👁 Δ 33 2019-07-15, 18:34 New Erlang implementation by user [Frederick John] Frederick John
👁 Δ 32 2019-01-25, 11:41 New JS implementation by user [1.7.4] 1.7.4
👁 Δ 31 2018-12-18, 16:17 [Rust] Add demo freecoder
👁 Δ 30 2018-12-18, 16:14 [Rust] Not needed extern crate in Rust 2018 freecoder
👁 Δ 29 2018-12-18, 16:14 [Rust] Bug fixing freecoder
👁 Δ 28 2018-06-11, 22:50 [Ruby] added comment to about not seeding being better steenslag
👁 Δ 27 2018-06-11, 22:31 New Rust implementation by user [GobbleCock] GobbleCock
👁 Δ 26 2016-04-12, 21:27 [Ruby] removed comment
👁 Δ 25 2016-04-07, 22:14 [Ruby] added comment
👁 Δ 24 2016-04-07, 11:20 New Lua implementation by user [Nepta]
👁 Δ 23 2016-03-02, 13:28 New PHP implementation by user [dotvezz]
👁 Δ 22 2016-02-18, 16:58
👁 Δ 21 2015-11-30, 12:37
👁 Δ 20 2015-10-31, 14:45
👁 Δ 19 2015-10-29, 14:05
👁 Δ 18 2015-09-05, 07:23
👁 Δ 17 2015-09-03, 16:24
👁 Δ 16 2015-08-23, 10:25
👁 Δ 15 2015-08-22, 21:50
👁 Δ 14 2015-08-22, 21:49
👁 Δ 13 2015-08-21, 23:35
👁 Δ 12 2015-08-21, 23:34
👁 Δ 11 2015-08-21, 23:34
👁 Δ 10 2015-08-20, 14:35
👁 Δ 9 2015-08-20, 11:04
👁 Δ 8 2015-07-31, 23:41
👁 Δ 7 2015-07-31, 19:54
👁 Δ 6 2015-07-28, 22:35
👁 Δ 5 2015-07-28, 22:34
👁 Δ 4 2015-07-28, 22:34
👁 Δ 3 2015-07-28, 22:29
👁 Δ 2 2015-07-28, 22:27
1 2015-07-28, 22:17