幽灵资源网 Design By www.bzswh.com
效果图:

复制代码 代码如下:
@echo off&color 0e
setlocal enabledelayedexpansion
mode con: cols=130 lines=130
:top
cls
::set /p in=请输入行数:
set in=23&set ab=1&set var=64
if "%in%"=="" goto top
if %in% geq 35 goto top
if %in% leq 0 goto top
echo %in%|findstr /r "^[0-9][0-9]*$">nul 2>nul||goto top
set str=1
for /l %%i in (1,1,%in%) do (
set num=
set num2=0
for %%a in (!str!) do (
set /a num2+=1
if !num2!==1 set "str1="
set /a num1=%%a+num
set "str1=!str1! !num1!"
set num=%%a
)
call :lis "!str1:~1!"
set "str=!str1! 0"
)
rem 再输出个倒 金字塔 玩玩。
for /l %%a in (22 -1 1) do echo !nam%%a!
for /l %%i in (1 1 3) do (
for %%a in (a b c d e f) do (
color 0%%a
ping/n 2 127.1>nul
))
exit
:lis
set max=%~1
for /l %%a in (0 1 300) do (
if not "!max:~%%a,1!"=="" set /a ci+=1
)
set /a ki=var-ci/2
for /l %%a in (1 1 !ki!) do set kg= !kg!
echo !kg!!max!
set nam!ab!=!kg!!max!
set /a ab+=1
set ci=0&set kg=
goto :eof

复制代码 代码如下:
@echo off&color 0e
setlocal enabledelayedexpansion
mode con: cols=130 lines=130
:top
cls
::set /p in=请输入行数:
set in=23&set ab=1&set var=64
if "%in%"=="" goto top
if %in% geq 35 goto top
if %in% leq 0 goto top
echo %in%|findstr /r "^[0-9][0-9]*$">nul 2>nul||goto top
set str=1
for /l %%i in (1,1,%in%) do (
set num=
set num2=0
for %%a in (!str!) do (
set /a num2+=1
if !num2!==1 set "str1="
set /a num1=%%a+num
set "str1=!str1! !num1!"
set num=%%a
)
call :lis "!str1:~1!"
set "str=!str1! 0"
)
rem 再输出个倒 金字塔 玩玩。
for /l %%a in (22 -1 1) do echo !nam%%a!
for /l %%i in (1 1 3) do (
for %%a in (a b c d e f) do (
color 0%%a
ping/n 2 127.1>nul
))
exit
:lis
set max=%~1
for /l %%a in (0 1 300) do (
if not "!max:~%%a,1!"=="" set /a ci+=1
)
set /a ki=var-ci/2
for /l %%a in (1 1 !ki!) do set kg= !kg!
echo !kg!!max!
set nam!ab!=!kg!!max!
set /a ab+=1
set ci=0&set kg=
goto :eof
标签:
杨辉三角
幽灵资源网 Design By www.bzswh.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
幽灵资源网 Design By www.bzswh.com
暂无评论...