TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
I can code that FizzBuzz function with only two tests
2 points
by
plastic_teeth
almost 5 years ago
2 comments
rethab
almost 5 years ago
Collapse
Or with AWK: echo 15 | awk '$1%3==0{s=s"Fizz"} $1%5==0{s=s"Buzz"} END{print s}'
评论 #23465041 未加载
brudgers
almost 5 years ago
There is no clever way to compute FizzBuzz. It is a constant.