- @echo off
- setlocal enabledelayedexpansion
- set "line=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 (!line!) do (set /a n+=1 & set _!n!=%%i)
- set /a aa=%random%%%26+1
- set /p bb=请输入一个0--26之间的随机数
- if !aa! leq !bb! (
- for /l %%i in (!aa!,1,!bb!) do set /p =!_%%i! <nul
- ) else (
- for /l %%i in (!bb!,1,!aa!) do set /p =!_%%i! <nul
- )
- pause>nul
复制代码
|