參考以上前輩做的- @echo off&setlocal enabledelayedexpansion
- set /p var=Input Alphabet:
- set n=-2
- set "str=a b c d e f g h i j k l m n o p q r s t u v w x y z"
- for %%i in (%str%) do (
- set /a n+=2
- set %%i=!n!)
- set "star=%var:~,1%"
- set "end=%var:~-1%"
- set /a end1=!%end%!-!%star%!+1
- call echo %%str:~!%star%!,%end1%%%
- pause
复制代码
|