Skip to content

Instantly share code, notes, and snippets.

@akiinyo
akiinyo / FizzBuzz
Created October 27, 2011 13:14
素直にかくとこうなる。
range = 1..100
range.each do |num|
if (num%3 == 0 && num%5 == 0)
p 'FizzBuzz'
elsif (num%3 == 0)
p 'Fizz'
elsif (num%5 == 0)
p 'Buzz'
else
p num
10 20 * * 1,4,5 ruby -r pp -e 'p Time.now; pp ENV' > ~/cronlog.txt