Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!saturn!kjell From: kjell@saturn.ucsc.edu (Kjell Post) Newsgroups: comp.lang.c Subject: Re: programming challenge (silly) Message-ID: <6619@saturn.ucsc.edu> Date: 7 Mar 89 13:21:00 GMT References: <2102@jasper.UUCP> <9789@smoke.BRL.MIL> <3115@homxb.ATT.COM> Reply-To: kjell@saturn.ucsc.edu (Kjell Post) Distribution: na Organization: University of California, Santa Cruz Lines: 18 In article <3115@homxb.ATT.COM> cjn@homxb.ATT.COM (C.NORTHRUP) writes: > >------------------------------------------ > >Kevin Meier from AT&T Bell Labs completed this in approx 15 minutes using >only 96 characters. I will submit his solution in a couple of days. >Gives others a chance.... I have 91 now but am not sure about portability of main(n,m) and printf. main(n,m){scanf("%d\n",&m);while(m>1&m<10)n*=m--; printf(m-1?"error\n":"answer is %d\n",n);} -- For athletes and programmers, ! Kjell E. Post a woman is the end of their career. ! CIS/CE ! University of California, Santa Cruz -- A.Wickberg ! Email: kjell@saturn.ucsc.edu