Comment detail

変形Fizz-Buzz問題 (Nested Flatten)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
@echo off
setlocal enabledelayedexpansion
set /a n=%1+19
for /l %%i in (%1,1,%n%) do (
  set /a a=%%i%%3
  set /a b=%%i%%5
  set d=
  if !a!==0 set d=Fizz
  if !b!==0 set d=!d!Buzz
  if "!d!"=="" set d=hoge
  echo %%i:!d!
)

Index

Feed

Other

Link

Pathtraq

loading...