Random variable with variable limit

February 8, 2011 at 09:34:34
Specs: Windows XP/Vista
I have random number batch script and I want to set the limit to be a variable. I tried but it didn't work so either it is not possible, or I got the syntax wrong. If it is possible can someone please tell me the syntax.

See More: Random variable with variable limit

Report •

February 8, 2011 at 14:32:57
SET /p Var=Enter the maximum number:
SET /a Rand=(%Random% %%Var%)+1

Can I put a question here?

Report •
Related Solutions

Ask Question