home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:17035 comp.lang.c++:16767 comp.misc:4376
- Newsgroups: comp.lang.c,comp.lang.c++,comp.misc
- Path: sparky!uunet!rexago8!aa
- From: aa@rexago8.uucp (Adam Andrews)
- Subject: Re: Confused
- Message-ID: <1992Nov23.142320.9675@rexago8.uucp>
- Organization: Summit Information Systems
- References: <957@hq.dla.mil>
- Date: Mon, 23 Nov 1992 14:23:20 GMT
- Lines: 30
-
- fhi0055@hq.dla.mil (Marc Poole) writes:
-
- [some code deleted]
- >printf ("Enter you number: ____\b\b\b\b");
- >scanf ("%d",&fact);
-
- >while
- >{
- > while (fact > 0)
- > {
- > count = count * fact--;
- > }
- >answr = count;
- >printf ("%e", answr);
- >printf ("\n");
- >printf ("Enter another number or 0 to quit: ___\b\b\b");
-
- I hope you have another scanf here; otherwise you will always have an infinite
- loop unless 0 is the first number they enter (assuming you implement the
- solutions in the previous posts).
-
- >}
-
-
- >printf ("\n");
- >}
-
- --
- Adam Andrews "When the going gets weird, we get even weirder."
- uunet!rexago8!aa or aa@rexago8.UUCP e-mail only to aa@summitis.com
-