programming challenge (silly)

Matthew Squires squires at eecs.nwu.edu
Mon Mar 13 08:28:09 AEST 1989


/ eecs.nwu.edu:comp.lang.c / pathak at s.cs.uiuc.edu /  8:44 pm  Mar 10, 1989 /


> main(n,m){for(scanf("%d",&m);m>1&m<10;n*=m--);
> printf(m-1?"error\n":"answer is %d\n",n);}

The expression "m>1&m<10" can be optimized by one character with the
expression "m>1^m>9".

> Heeren Pathak
> s.cs.uiuc.edu
> zaphod.ncsa.uiuc.edu



More information about the Comp.lang.c mailing list