Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@echo off
set /A i=1
set /A sum=0
set /A irem3=%i% %% 3
set /A irem5=%i% %% 5
if %irem3% EQU 0 (set /A sum+=%i%) else (if %irem5% EQU 0 set /A sum+=%i%)
set /A i+=1
if %i% lss 1000 goto loop
echo %sum%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.