This website requires JavaScript.
Explore
Help
Register
Sign in
aparler
/
RosettaCodeData
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
12
Pull requests
3
Projects
Releases
Packages
Wiki
Activity
Actions
master
RosettaCodeData
/
Task
/
FizzBuzz
/
Ruby
/
fizzbuzz-4.rb
5 lines
104 B
Ruby
Raw
Permalink
Normal View
History
Unescape
Escape
March 2014 update
2014-04-02 16:56:35 +00:00
(
1
..
100
)
.
each
do
|
n
|
v
=
"
#{
"
Fizz
"
if
n
%
3
==
0
}
#{
"
Buzz
"
if
n
%
5
==
0
}
"
puts
v
.
empty?
?
n
:
v
end
Reference in a new issue
Copy permalink