I don't understand why things like this get posted to HN so often. This kind of program is a very common exercise in university courses and appears in countless programming books. Heck, you implemented it in C, and this exact exercise appears in K&R C.
I hope this doesn't come off as snide... I just don't understand why the author would think this is something worth showing off.
I hope this doesn't come off as snide... I just don't understand why the author would think this is something worth showing off.