1. @ECHO OFF
  2. :prompt
  3. SET /P age="Enter age: "
  4. IF "%age%"=="18" (
  5. ECHO You're an adult now, time to pay rent...
  6. ) ELSE IF %age% GEQ 18 (
  7. REM The ELSE IF line works only if the first condition fails.
  8. REM Normally both conditions are true if %age%=18
  9. ECHO You're 18 or over, welcome to the pub!
  10. ) ELSE (
  11. ECHO Get outta here, you're %age%
  12. )
  13. ECHO.
  14. GOTO:prompt