Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将尝试解释我的情况:
假设我有数字 30,我想制作一个批处理脚本,将 1 添加到该数字,直到其模除 4
设置 / 一个数字 = 30 %% 4
我怎样才能知道将 2 添加到 30 以使其成为 mod 4 ?
提前谢谢
这是你需要的吗?
@echo off set num=30 :loop set /a num=num+1 set /a number=num %% 4 if %number% NEQ 0 goto :loop echo %num%