Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Pick-random-element/Batch-File/pick-random-element.bat
Normal file
16
Task/Pick-random-element/Batch-File/pick-random-element.bat
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
::Initializing the pseudo-array...
|
||||
set "pseudo=Alpha Beta Gamma Delta Epsilon"
|
||||
set cnt=0 & for %%P in (!pseudo!) do (
|
||||
set /a cnt+=1
|
||||
set "pseudo[!cnt!]=%%P"
|
||||
)
|
||||
::Do the random thing...
|
||||
set /a rndInt=%random% %% cnt +1
|
||||
|
||||
::Print the element corresponding to rndint...
|
||||
echo.!pseudo[%rndInt%]!
|
||||
pause
|
||||
exit /b
|
||||
Loading…
Add table
Add a link
Reference in a new issue