delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/08/00:23:46

Message-Id: <3.0.6.32.19990208002151.008e2cb0@pop.netaddress.com>
X-Sender: pderbysh AT pop DOT netaddress DOT com
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Mon, 08 Feb 1999 00:21:51 -0500
To: djgpp AT delorie DOT com
From: Paul Derbyshire <pderbysh AT usa DOT net>
Subject: Re: recursive factorial
In-Reply-To: <3.0.6.32.19990207235345.008e59e0@pop.netaddress.com>
References: <002301be5318$9d1b86e0$461b2bc8 AT luis>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

At 11:53 PM 2/7/99 -0500, you wrote:
>The problem line:
>>    return passed *  rcs_factorial(--passed);

>To make this code work:
>return passed *  rcs_factorial(passed-1);

This might also work. :-)
return (++passed) *  rcs_factorial(--passed);

I don't recommend it though. :-)

-- 
   .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
-()  <  circles, and bark is not smooth, nor does lightning travel in a
   `*'  straight line."    -------------------------------------------------
        -- B. Mandelbrot  |http://surf.to/pgd.net
_____________________ ____|________     Paul Derbyshire     pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019