daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Exercise 4
  2. (1..100).each do |i|
  3.   remainders = [i % 3] << i % 5
  4.   if (!remainders.include? 0)
  5.     puts i
  6.   else
  7.     puts "#{"Fizz" if remainders[0] == 0}#{"Buzz" if remainders[1] == 0}"
  8.   end
  9. end
RAW Paste Data
Top