programming puzzle (silly)

Dave Jones djones at megatest.UUCP
Sat Mar 11 07:50:17 AEST 1989


>From article <28336 at ucbvax.BERKELEY.EDU>, by klier at ucbarpa.Berkeley.EDU (Pete Klier):
> 
> ***********************
> main(m,n){scanf("%d",&n);for(m=n>0^n>9;n&&m*=n--;);
> printf(m?"Answer=%d\n":"error\n",m);}
> ***********************
> 
> with help from Jeff Conroy (jmconroy at ernie.Berkeley.EDU)
>  

Awesome. Truely awesome.

I don't think this entry will be surpassed.

By the way, this looks a little like some of the code in the original
4.2BSD Pascal compiler.



More information about the Comp.lang.c mailing list