模拟跳舞机的批代码
@echo off
mode con cols=40 lines=20
set str=↖↑↗← →↙↓↘
setlocal enabledelayedexpansion
:begin
for /l %%i in (1,1,9) do set n%%i=%str:~4,1%
set /a num=%random%%%9
call set char=%%str:~%num%,1%%
set /a num=!num!+1
set n%num%=%char%
call :result
goto begin
:result
cls
echo.
echo.
echo.
echo.
echo.
echo ┌──┬──┬──┐
echo │ %n1% │ %n2% │ %n3% │
echo ├──┼──┼──┤
echo │ %n4% │ %n5% │ %n6% │
echo ├──┼──┼──┤
echo │ %n7% │ %n8% │ %n9% │
echo └──┴──┴──┘
ping -n 2 127.1>nul
goto :eof
endlocal
欢迎提出保贵建议