Last active
December 14, 2015 03:39
-
-
Save kunst1080/5022704 to your computer and use it in GitHub Desktop.
コマンドプロンプトワンライナーでFizzBuzz ( ref: http://kunst1080.hatenablog.com/entry/2013/02/24/140748 )
(コマンドプロンプト芸)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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