Nombre aléatoire en MS-DOS

Fermé
Profil bloqué - 16 janv. 2011 à 13:48
 Profil bloqué - 16 janv. 2011 à 14:19
Bonjour,
Je souhaite créer une variable variant entre le nombre 1 et 20 en dos.
Comment faire svp.



4 réponses

dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 5 615
16 janv. 2011 à 14:05
hello
set /a x=%RANDOM%*20/32767
0
Profil bloqué
16 janv. 2011 à 14:15
thank you and for 21 to 25?
0
Profil bloqué
16 janv. 2011 à 14:17
en fait je crois que si je fait set /a x=%random%*5+20 c'est bon non?
0
Profil bloqué
16 janv. 2011 à 14:19
c'est bon j'ai trouvé c'est set /a x=%RANDOM%*5/32767+20
0