Skip to content

Instantly share code, notes, and snippets.

@mikeda
Created December 13, 2012 23:55
Show Gist options
  • Save mikeda/4281232 to your computer and use it in GitHub Desktop.
Save mikeda/4281232 to your computer and use it in GitHub Desktop.
手元のbashでFizzBuzz書いた
#コーディング時間5分。書き始める前に他の作業しながらある程度考えてた
$ for i in {0..100};do if [ $((i%15)) -eq 0 ];then echo FizzBuzz;elif [ $((i%3)) -eq 0 ];then echo Fizz;elif [ $((i%5)) -eq 0 ];then echo Buzz;else echo $i;fi;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment