Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
コマンドプロンプトワンライナーでFizzBuzz ( ref: http://kunst1080.hatenablog.com/entry/2013/02/24/140748 ) (コマンドプロンプト芸)
for /f "usebackq tokens=1,2" %a in (`"for /L %n in (1,1,100) do @set /a (10-%n%3)/10 && set/a (10-%n%5)/10 && echo %n && echo."`) do @(if %a==11 (echo FizzBuzz) else if %a==10 (echo Fizz) else if %a==01 (echo Buzz) else (echo %b))
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.