Page 1 of 1
Picture this program
Posted: Thu Oct 21, 2010 9:26 pm
by chephy
I wonder how people who have not seen the obfuscated C contest entry »Pi« (
http://www.cise.ufl.edu/~manuel/obfuscate/pi.c) solve this. Googling? Guessing? Actually trying to make sense of the code?
Posted: Sat Nov 06, 2010 2:12 pm
by the hellridden Baron
Guessing. :o
Took me (about) 5 seconds after seeing this challenge for the first time. :D
Posted: Mon Nov 29, 2010 11:22 am
by Karian
I tried making sense of the code, then going for the guess based on the visual look
Posted: Fri Jun 24, 2011 11:25 am
by AMindForeverVoyaging
I recognized it immediately because I know of the IOCCC. But I think even if you don't, you could always grab a C compiler and just run the program (and remove the warnings
). The result of 3.156 together with looking at the source code reveals the answer pretty quickly.
Posted: Thu Jul 21, 2011 7:10 pm
by DaymItzJack
"What is this attempting to calculate"
"Which numbers do I know...?"
pi.
Straight up guess =/
Posted: Thu Jul 21, 2011 8:13 pm
by CodeX
pasting it on
codepad would also do the trick, but it probably is too guessable for it's own good
Posted: Sat Feb 04, 2012 11:24 am
by aurora
guessing [2] ... the answer is imo obvious
Posted: Sun Mar 10, 2013 7:29 pm
by haellowyyn
Compiling and executing the code gives you '3.156'. Then, it's easy to guess
Posted: Mon May 12, 2014 11:38 pm
by Hippo
Yes, I have decided to run it on online c interpretter and 3.156 was not accepted so I read the challenge forum and answered pi. I have not looked at expanded code till now ... OK each "disk pixel" decrements F, but OO is decremented only on the line start otherwise -F>0 is evaluated to true so OO is not decremented. Therefore F/OO/OO is disk to square ratio ...