Coin Toss

echo Cash left: $%cash%
echo.
echo.
goto :EOF

:bet1
call :display1
echo How much do you wager?
set /p x2=
if %x2% gtr %cash% (
echo You don't have that much . . .
pause >nul
goto bet1
)
if %x2% equ 0 (
echo You need to wager something . . .
pause >nul
goto bet1
)
set r1=%random%
set r2=%r1%
set /a r1= %r1% / 2
set /a r1= %r1% * 2
if %r1%==%r2% (
set /a cash=%cash%-%x2%
call :display1
echo You lost $%x2%
pause >nul
goto menu
) else (
set /a cash=%cash%+%x2%
call :display1
echo You won $%x2%
pause >nul
goto menu
)