@echo off
set /p string=请输入一个字符串:
:again
set contain=abcdefghijklmnopqrstuvwxyz
if defined string set number=%string:~0,3%
if defined string (
if %number% GEQ 100 (
if %number% LEQ 109 (
set /a number=%number%-100
goto end
)
)
if %number% GTR 109 (
if %number% LEQ 145 (
set /a number=%number%-120
setlocal enabledelayedexpansion
for /l %%i in (1,1,!number!) do set contain=!contain:~1!
set number=!contain:~0,1!
goto end
)
)
goto finalend
:end
echo %number%
:finalend
set string=%string:~3%
goto again
)
pause