斑竹,是练习题吗?- @echo off&setlocal enabledelayedexpansion
- set str=3 14 15 9 26 53 58 97 9
- (for %%b in (%str%) do set /a a=%%b+10000&echo,!a!)>$
- for /f "delims=" %%a in ('sort $') do set /a a=%%a-10000&set /p=!a! <nul
- del $&pause
-
- for %%a in (%str%) do set /a n+=1&set .!random!.!n!=%%a
- for /f "tokens=2 delims==" %%a in ('set .') do set /p=%%a <nul
- pause
复制代码
|