From e4477b08dcf97ef73bbbe2278f20d69d2f74ac6f Mon Sep 17 00:00:00 2001 From: Simon Wiesend Date: Sun, 30 Nov 2025 09:11:32 +0100 Subject: [PATCH] set the seed for the RNG just once at the beginning of the program this improves randomness for tests where createNumbers() is called in rapid succession --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 34163d0..c73fdf9 100644 --- a/main.c +++ b/main.c @@ -39,6 +39,9 @@ int main(int argc, char *argv[]) { int exitCode = EXIT_FAILURE; + // set seed + srand(time(NULL)); + if(argc != 2) { fprintf(stderr, "Usage: %s \n", argv[0]);