- @echo off&setlocal enabledelayedexpansion
- set/a n=55,m=100-n
- set s=差D中C高B优A
- for %%a in (70 80 90 100) do (
- for /l %%b in (!n!,1,%%a) do set #%%b=!s:~,1!
- set n=%%a
- set ##!s:~,1!=!s:~1,1!
- set s=!s:~2!
- )
-
- for %%a in (A B C D) do (
- for /l %%b in (1,1,100) do (
- set/a ran=!random!%%m+55
- set $!random:~-2!$%%a$%%b$!ran!=1
- )
- set r=进步退步
- for %%c in (优 高 中 差) do (
- set #%%a%%c=!r:~,2!
- if !##%%c! equ %%a set #%%a%%c=稳定&set r=!r:~2!!r:~,2!
- ))
-
- for /f "tokens=2,3,4 delims=$=" %%a in ('set $') do (
- for %%d in (%%a!#%%c!) do (
- echo %%a-%%b;%%c;!#%%d!
- )
- set/a @!#%%c!等+=1
- )
- set @
- pause
复制代码
[ 本帖最后由 netbenton 于 2010-6-30 22:10 编辑 ] |