home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!goanna!ok
- From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
- Newsgroups: comp.lang.c
- Subject: Re: confused
- Message-ID: <16055@goanna.cs.rmit.oz.au>
- Date: 24 Nov 92 04:00:46 GMT
- References: <1elj18INNnah@uwm.edu>
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Lines: 23
-
- > #include <stdio.h>
- > main()
- > {
- > float answr;
- > int fact;
- > int count;
- >
- > printf ("This program is designed to print the factoral of a number ");
- > printf ("entered by the user.\n");
- > printf ("Enter your number: ____\b\b\b\b");
-
-
- A style point:
- It is a good idea to make similar things look similar
- and different things look different.
- Keywords like 'while', 'for', 'if' are quite different from
- function identifiers. It is a good idea to make them visually
- distinct. Two alternatives:
- f(x, y, z); f (x, y, z);
- while (n > 0) while(n > 0);
-
- An implementation point:
- Check your <math.h> to see if you have a function called gamma().
-