wonderful 当前离线
列兵
@echo off echo 第一题: for /l %%i in (1,1,100) do echo %%i echo 第二题:& pause >nul for /l %%i in (1,2,99) do echo %%i echo 第三题:& pause >nul set var=bbs bathome.net echo %var% for /f "tokens=1 " %%a in ("%var%") do echo %%a for /f "tokens=2 " %%b in ("%var%") do echo %%b for /f "tokens=3 " %%c in ("%var%") do echo %%c echo 第四题的第一小题:& pause >nul for /f "tokens=2" %%i in (f:\test.txt) do @echo %%i echo 第四题的第二小题:& pause >nul for /f "tokens=1-3" %%i in (f:\test.txt) do @echo %%i %%j %%k pause复制代码
TOP
endlesslove137 当前离线
@echo off for /l %%i in (1,1,100) do echo %%i pause复制代码
@echo off for /l %%i in (1,2,99) do echo %%i pause复制代码
@echo off for /f "delims=, tokens=2" %%i in (test.txt) do echo %%i pause复制代码
paladinjin 当前离线
中尉
@echo off for %%i in (bbs bathome net) do ( echo %%i ) for /l %%i in (1 1 100) do (ehco %%i) for /l %%i in (1 2 99) do ( echo %%i )复制代码
senlinzhihuo 当前离线
@echo off for /f "tokens=1,2,3 delims=. " %%i in ("bbs bathome.net") do (echo %%i echo %%j echo %%k ) pause复制代码
fish 当前离线
@echo off echo 问题1的答案: for /l %%i in (1,1,100) do set /p=%%i <nul echo/ echo/ echo 问题2的答案: for /l %%i in (1,2,99) do set /p=%%i <nul echo/ echo/ echo 问题3的答案: set s=bbs bathome.net set v=%s:.= % for %%i in (%v%) do ( echo %%i ) echo/ echo/ echo 问题4的答案: echo ①: for /f "delims=" %%i in (f:\test.txt) do echo %%i echo ②: for /f "tokens=2" %%i in (f:\test.txt) do echo %%i pause>nul复制代码
rogue_1983 当前离线
六级士官
@echo off for %%i in (bbs bathome .net) do echo %%i pause复制代码
@echo off for %%i in ("e:\test.txt") do type %%i pause复制代码
killvirus 当前离线
beiho 当前离线
jsls 当前离线
@echo off for /l %%i in (1 1 100) do echo %%i pause复制代码
@echo off for /l %%i in (1 2 99) do echo %%i pause复制代码
@echo off set str=bbs,bathome,net for %%i in (%str%) do echo %%i pause复制代码
awp628 当前离线
@echo off for /l %%i in (1,2,99) do echo.%%i复制代码
@echo off for /l %%i in (1,1,100) do echo.%%i复制代码
vfcai 当前离线
@echo off for /l %%i in (1,1,100) echo %%i pause复制代码
@echo off for /l %%i in (1,2,99) echo %%i pause复制代码
@echo off for /f "delims=, "复制代码
rivch 当前离线
一级士官
@echo off set txt=bbs bathome.net for /f "tokens=1-3 delims=. " %%i in ("%txt%") do ( echo %%i echo %%j echo %%k ) pause>nul复制代码
@echo off for /f "delims=" %%i in (1.txt) do echo %%i pause>nul复制代码
@echo off for /f "tokens=2,5,8" %%i in (1.txt) do echo %%i pause>nul复制代码
zhiyanzhai33 当前离线
@echo off echo 第一题 for /l %%i in (1,1,100) do echo %%i pause & cls echo 第二题 for /l %%i in (1,2,99) do echo %%i pause & cls echo 第三题 for /f "tokens=1-3 delims=. " %%i in ("bbs bathome.net") do ( echo %%i echo %%j echo %%k ) pause & cls echo 第四题①,这个可以不用for: type test.txt echo. & pause & cls echo 第四题② for /f "tokens=2" %%i in (test.txt) do echo %%i pause & cls复制代码