Author: Uri Blass
Date: 03:53:43 07/30/03
Go up one level in this thread
On July 29, 2003 at 15:31:11, Tord Romstad wrote:
>On July 29, 2003 at 15:17:51, Dann Corbit wrote:
>
>>Of course, you can get bizarre in C too (the "C Puzzle Book" is proof enough of
>>that.) I once had the displeasure of someone giving me a function that was a
>>64K return statement. He thought it was cute.
>
>This is getting increasingly off-topic, but I cannot resist the temptation
>to post the cutest little C program I have ever seen. It computes an
>approximation of pi by calculating its own area. :-)
>
>
>/*
> * Program to compute an approximation of pi
> * by Brian Westley, 1988
> * (requires pcc macro concatenation; try gcc -traditional-cpp)
> */
>
>#define _ -F<00||--F-OO--;
>int F=00,OO=00;
>main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
>{
> _-_-_-_
> _-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_-_-_-_-_
> _-_-_-_-_-_-_-_
> _-_-_-_
>}
You know C better than me.
I do not understand this program
I have define in my program but I do not understand
#define _ -F<00||--F-OO--;
If I understand correctly the computer should replace every _ by
-F<00||--F-OO--;
I do not understand what is the meaning of
int F=00,OO=00;
What is OO?
If it is a varaible then the program has uninitialized varaible.
Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.