标签: batch-file for-loop
我想打印用户想要的n次,并计算打印的次数为'i'变量。代码有什么问题。
echo How many want to prints? set /p numPrints= set i=1 FOR /L %%A IN (%i%,1,numPrints) DO ( echo Hello World )
答案 0 :(得分:2)
FOR /L %%A IN (%i%,1,%numPrints%) DO (
%var%指的是变量var
%var%
var