1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| @echo off
set money=500
:start
set rep1=10
set rep2=50
set rep3=200
set /p buy=choix:
(if %buy%==1 (
if %buy%==1 goto :1
))
(if %buy%==2 (
if %buy%==2 goto :2
))
(if %buy%==3 (
if %buy%==3 goto :3
))
:1
if %money% GEQ %rep1% set /a money=%money%-%rep1%
echo il vous reste %money%$.
pause
goto:next
:2
if %money% GEQ %rep2% set /a money=%money%-%rep2%
echo il vous reste %money%$.
pause
goto:eof
:3
if %money% GEQ %rep3% set /a money=%money%-%rep3%
echo il vous reste %money%$.
pause
exit/b
:next
echo je continue |