Skip to content

Comment on Solving Fizz Buzz with Cosines

Comments

So, there’s a similar way to do it with a function that produces one of the characters in “FizBu\nx” and a while true loop that

- increases i on every \n,

- prints i when that produces x, otherwise prints the character

(Disregarding rounding errors)

That would be fairly obfuscated, I think.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.