I'm writing a little program but I have a problem with an if else statement.
@echo off set /p points= echo %points% echo 1x5= set /p 15= if %15%==5 ( echo well done! set /a points=%points%+1 ) else ( echo wrong! ) pause echo %points% pause Even if I fill in a wrong answer, it still ads 1 point to my points and says "Well done!"
(BTW: got some problems with inputting the code, don't now if you will be able to read it)