(silly challenge); Can you beat this?

gordon linoff gordon at think.COM
Tue Mar 14 05:32:45 AEST 1989


I wish I could take credit for this, but it is now down to 83 characters
(84 with the trailing newline).

Dan Perkins of Zycad Corporation came up with it.

And this is it . . .

	main(y,x){for(scanf("%d",&x);--x%9;y*=x+1);
	printf(x?"error\n":"answer is %d\n",y);}

The extra carriage return is for your reading pleasure, of course.

--gordon at think.com
Thinking Machines Corporation



More information about the Comp.lang.c mailing list