@echo off
set i=0
echo Thinking of a number...
:rand
set nmb=%random%
if %nmb% GTR 10 goto rand
if %nmb% EQU 0 goto rand
echo Now LinktoHow give 3 chances to guess the right one!
:enter
set /p "ent=Your number : "
set /a i=%i%+1
if %ent% EQU %nmb% (
echo You're lucky!
pause
exit
)
if %i% LSS 3 (
goto enter
)
if %i% EQU 3 (
echo Game Over:(
pause
)
set i=0
echo Thinking of a number...
:rand
set nmb=%random%
if %nmb% GTR 10 goto rand
if %nmb% EQU 0 goto rand
echo Now LinktoHow give 3 chances to guess the right one!
:enter
set /p "ent=Your number : "
set /a i=%i%+1
if %ent% EQU %nmb% (
echo You're lucky!
pause
exit
)
if %i% LSS 3 (
goto enter
)
if %i% EQU 3 (
echo Game Over:(
pause
)