/fizzbuzz

FizzBuzz and beyond homework

Primary LanguageRuby

= FizzBuzz and Beyond

I provided 3 solutions for this homework. The 1st method is the typical solution for solving fizzbuzz puzzle (like everyone else did). The 2nd method is more readable, slightly better version than the 1st method. The 3rd method is for the extensible version to support more numbers added into the list in future.

For the 3rd method, this is the assumption I'm making. Suppose we're given a csv file that has all the fizzbuzz values and their associated messages like below:

Fizzbuzz,"Div","Msg"
fb1,3,"Fizz"
fb2,5,"Buzz"
fb3,7,"Sivv"
fb4,15,"FizzBuzz"

Lastly, I haven't had a chance to test/run this in ruby to check the outputs yet, but the idea is there!