|
Advertisement
|
Forum posts by Brady Hales:1 page [ 1 ]
Posted in Java Answers Forum, Dec 13, 2002, 6:56 PM
I'm trying to write a program that will calculate inverse factorial numbers (i.e. 1/n!). I want to use a recursive method, but I have problems with it dividing by zero. What can I do to prevent this?Here is my code:public class InFact{ private static double InFact(double n) { return (InFact(1/n) * InFact(1/(n-1))); } public static void main...
1 page [ 1 ]
|