Batch File Heads or Tails Generator
by I_boom5245 in Circuits > Computers
2542 Views, 3 Favorites, 0 Comments
Batch File Heads or Tails Generator
Code for a random heads or tails generator.
- Open notepad
- Copy code below
- Save it as ht.bat and click TEXT DOCUMENT and change it to ALL FILES
- Click save
@echo off
:top
cls
echo To flip the coin press enter
set /p enter=
set /a a=%random% %% 2+1
if %a% EQU 1 (
echo Heads pause goto top
)else echo Tails pause goto top