本帖最后由 canyuexiaolang 于 2012-2-19 15:25 编辑
- @echo off & setlocal enabledelayedexpansion
- set "x=1" & set "y=21" & set "z=0" & set "ax=1"
- set "12=4 18 19 6 7 8 9 10 11 12 13 14 15 16" & set "24=3 5 17 20"
- for /l %%i in (2 1 22) do (set /p=*<nul & call :cos "%%i")
- pause>nul
- exit
-
- :cos
- set /a ax=62-x & for /l %%j in (1 1 !ax!) do set /p= <nul
- for %%x in (!12!) do if %~1 equ %%x set /a z+=1 & set /a x+=2
- for %%x in (!24!) do if %~1 equ %%x set /a z+=2 & set /a x+=4
- if %~1 equ 2 set /a z+=3 & set /a x+=6
- if %~1 equ 21 set /a z+=4 & set /a x+=8
- set /p=*<nul & echo.
- if %~1 equ 22 goto :eof
-
- for /l %%i in (1 1 !z!) do set /p= <nul
- goto :eof
复制代码 我的代码NC到可笑。。不知道acos的作用。数坐标。。。大家别笑话~
Win7下跑不了。(主要是set/p= <nul)数出不了空格。不过把空格换成.还是可以显示的
坐标:
(1,1) (1,62)
(2,4) (2,59)
(3,6) (3,57)
(4,7) (4,56)
(5,9) (5,54)
(6,10) (6,53)
(7,11) (7,52)
(8,12) (7,51)
(9,13) (9,50)
(10,14) (10,49)
(11,15) (11,48)
(12,16) (12,47)
(13,17) (13,46)
(14,18) (14,45)
(15,19) (15,44)
(16,20) (16,43)
(17,22) (17,41)
(18,23) (18,40)
(19,24) (19,39)
(20,26) (20,37)
(21,31) (21,32)
===================
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
**
额。供大家参考。
Win7下的
- @echo off & setlocal enabledelayedexpansion
- set "x=1" & set "y=21" & set "z=0" & set "ax=1"
- set "12=4 18 19 6 7 8 9 10 11 12 13 14 15 16" & set "24=3 5 17 20"
- for /l %%i in (2 1 22) do (set /p=*<nul & call :cos "%%i")
- pause>nul
- exit
-
- :cos
- set /a ax=62-x & for /l %%j in (1 1 !ax!) do set /p=.<nul
- for %%x in (!12!) do if %~1 equ %%x set /a z+=1 & set /a x+=2
- for %%x in (!24!) do if %~1 equ %%x set /a z+=2 & set /a x+=4
- if %~1 equ 2 set /a z+=3 & set /a x+=6
- if %~1 equ 21 set /a z+=4 & set /a x+=8
- set /p=*<nul & echo.
- if %~1 equ 22 goto :eof
- for /l %%i in (1 1 !z!) do set /p=.<nul
- goto :eof
复制代码
|