|
|
|
|
|
by mc_hammer
4196 days ago
|
|
i dont think its correct though - the first time i got asked this problem was the also the first time i heard of fizz buzz - and i had already been doing c++ perl and shell scripting for 15 years... there was no written explanation, and i had no f clue what he was talking about. i couldnt solve it then and today 3 years later i could probably barely solve it. when he said "print every number up to one hundred and if its the 3rd line print fizz and if its the fifth line print buzz"... honestly my train of thought was "why the fk would u print every line and print again if its the 3rd line and print again if its the fifth line...?? and why would you print 6-100?"... not the best explanation either, and i had no idea he meant print the string "Fizz" when he said print fizz... i thought maybe he meant some ruby gem rails.Fizz or what not... of course the commenters code example above is clear as day, maybe i just read code better than i talk about code (this so much... for a lot of us). and i didnt get that job. |
|