programming challenge (silly)
mcdonald at uxe.cso.uiuc.edu
mcdonald at uxe.cso.uiuc.edu
Sat Mar 18 00:35:00 AEST 1989
>main(n,m){for(scanf("%d",&m);m>1&m<10;n*=m--);
>printf(m-1?"error\n":"answer is %d\n",n);}
May I ask: main(n,m){
This looks a bit odd - no declarations for n and m. Doesn't that
make them "ints"? That is fine for n, BUT isn't the second argument
to main a char * something[]? I would suspect that this example would
crash in Technicolor flames as often as not.
>How about some beautiful elegant self-documenting C contests instead of
>portmanteau obfuscatory unreadable ones?
To which I would like to add: 100% legal ANSI C (with no trigraphs :-) ).
More information about the Comp.lang.c
mailing list