jeudi 28 mai 2015

Number Generator 1-4 | Batch

There is an easy way to make a number generator.
But I just want the generated numbers to be 1 - 4

The following program takes too long to get an output

@echo off
:RUN
set /a Num=%random%
if %num% LEQ 4 echo %num%
goto :RUN

It runs %random% until it gets less than 4, which could be quite a while.




Aucun commentaire:

Enregistrer un commentaire