-
-
Save parzibyte/31c8c18d3a3abba19e8594afa8ab45c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Devuelve un número aleatorio entre minimo y maximo, incluyendo a minimo y maximo | |
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