|
 |
 |
 |
| |
 Nombre aléatoire
Public Function NombreAleatoire(MIN As Integer, Max As Integer) As Integer
Randomize
NombreAleatoire = Int((Max - MIN + 1) * Rnd + MIN)
End Function
Il suffit de faire :
msgbox NombreAleatoire(1,80)
ce qui permet d'afficher un nombre aléatoire entre 1 et 80.
|
|
 |
 |
 |
|