Employers: discover CodinGame for tech hiring
Practice
Compete
1
Contribute
Learn
Log In
Sign Up
Ruby sample code
tbpgr
10.6K views
01
FizzBuzz
02
Fibonacci
03
Prime
04
Eto
1/4
FizzBuzz
Next:
Fibonacci
FizzBuzz
FizzBuzz
1
2
3
4
5
6
7
8
9
(
1
..
100
).each
do
|
n
|
puts
case
0
when
n %
15
then
:FizzBuzz
when
n %
3
then
:Fizz
when
n %
5
then
:Buzz
else
n
end
end
Enter to Rename, Shift+Enter to Preview
Run
9
4
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
Suggested playgrounds
Tic Tac Toe Game Implementation
By
agorneo
5,452
17
1
Ruby Introduction (Dutch)
By
PeterDR
17.5K
3
0
MessageMedia Messages Ruby
By
IbrahimT
2,082
2
2
Chuck Norris
By
nbbroo
2,723
4
1
CodinGame - Home
ABOUT US
CAREERS
PRIVACY
FAQ
CodinGame - Work
The #1 tech hiring platform
SCREENING
SOURCING
RETAIN
ABOUT US
CAREERS
PRIVACY
FAQ
Facebook
YouTube
Twitter
LinkedIn
FR
EN
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants
Keyboard Shortcuts:
?
Show / hide this help menu
×