Date: Thu, 21 Jun 2001 16:22:51 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Jyri Vahtera cc: djgpp AT delorie DOT com Subject: Re: Problem in Factorial Program In-Reply-To: <9gsd0l$34e$1@news.clinet.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 21 Jun 2001, Jyri Vahtera wrote: > Here is code: > > #include > long factorial(n) > int n; > > { > long result = 1; > while (n>1) { result = result*n; n = n - 1; } > return result; > } > > main() > { > } > > Where I put the main? int main (void) { printf ("%ld\n", factorial (10)); return 0; }