悬崖之树 当前离线
上尉
@echo off set a=1&set b=2 echo 1 echo 2 :loop set /a c=a+b ping /n 2 127.1>nul echo %c% set a=%b% set b=%c% if %c% lss 2000000000 goto loop pause>nul复制代码
TOP
weichenxiehou 当前离线
@echo off set /a num1=1,max=10000,num=0 :next set/a num+=num1&set num1=%num% if %num% leq %max% (echo %num%&goto :next)复制代码
Taurus 当前离线
少尉
@echo off&set a=0,b=1&for /l %%i in (1,1,47)do call set/aa+=b,b=%%a%%&call echo %%a%% set/p=复制代码
suseek 当前离线
列兵
Lumiere (Lucien)当前离线
上校
@echo off&Setlocal enabledelayedexpansion set /p n=请输入您要显示的数列的项数然后回车: set /a n1=1&set /a n2=2 echo !n1!>>a.txt echo !n2!>>a.txt for /l %%a in (3 1 %n%) do ( set /a n3=!n1!+!n2!&echo !n3!>>a.txt set /a n1=!n2!&set /a n2=!n3! ) Endlocal pause复制代码