7 réponses
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
En C :
Une simple recherche Google t'aurai aiguillé dans un premier temps.
http://www.siteduzero.com/tutoriel-3-38766-l-aleatoire-en-c-et-c-se-servir-de-rand.html
Utilise la fonction rand.
Random dans un intervalle :
Une simple recherche Google t'aurai aiguillé dans un premier temps.
http://www.siteduzero.com/tutoriel-3-38766-l-aleatoire-en-c-et-c-se-servir-de-rand.html
Utilise la fonction rand.
Random dans un intervalle :
int rand_a_b(int a, int b){
return rand()%(b-a) +a;
}
Randomize
NB = Int((90 - 80 + 1) * Rnd )+ 80
sous forme de fonction dans VB
Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd) + Low
End Function