batch file - Display one of two messages (randomly, 50-50 chance) -
i creating .bat file generates solar system , make planets in random orders. wondering if there code make possible. if not, ideas use substitute?
set /a rand=%random% %% 2 %% "modulo operator". (the rest, when dividing first argument throught second 1 e.g.:
5 modulo 2 = 2*2 rest 1 )
a modulo operator of 2 give 0 or 1, operator of 4 give 0,1,2 or 3
note passionate mathematicans: know, operators, not exactly random, game effect negligible (less 0,0001)
Comments
Post a Comment