Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 19, 2019 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/6ff7eac5d731d56c9562a5899e5e6044 to your computer and use it in GitHub Desktop.
Save parzibyte/6ff7eac5d731d56c9562a5899e5e6044 to your computer and use it in GitHub Desktop.
// maximo y minimo son inclusivos
int aleatorio_en_rango(int minimo, int maximo) {
return minimo + rand() / (RAND_MAX / (maximo - minimo + 1) + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment