Skip to content

belongstorachel/fizzbuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

FizzBuzz without If or Else

I watched the talk RailsConf 2015 - Nothing is Something by Sandi Metz, where she talks about Smalltalk and how everything is sent through messages to objects. She showed an example of how to open up the Object, NilClass, and FalseClass classes to enable one to not use the if or else keywords. What better way to be challenged than to use FizzBuzz without using if,else, or case. :D

What is the FizzBuzz problem?

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

Releases

No releases published

Packages

No packages published

Languages