Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created Feb 26, 2019
Embed
What would you like to do?
// 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