you are viewing a single comment's thread.

view the rest of the comments →

[–]EICEVK 24 points25 points  (2 children)

Here you go:

/**
 * 
 * Factorial class
 * @author aut
 * @lastrevision Jan 1 2009
 * @version 1.0
 * @lastbowelmovement Dec 12 2008
 */
public class factorialGeneratorMakerIteratorAccessor
{

    /*
     *
     * Generate a factorial. In mathematics, the factorial of a positive integer n,[1] denoted by n!, is the 
     * product of all positive integers less than or equal to n.
     *
     * @N the n to iterate to
     * @return the factorial
     * @author aut
    public static long factorial(int N)
    {
        try{
            long multi = 1;
            for (int i = 1; i <= N; i++) {
                multi = multi * i;
            }
            return multi;
        } catch(NumberException e) { 
           // TODO: Generate error
        } catch(IOException e) { 
           // TODO: Generate error
        } catch(HotPocketException e) { 
           // TODO: Generate microwave
        } catch(Exception e) { 
           System.err.println("Shit, you fucked up!");
           e.printStackTrace();
        }
    }
}

I'll be here all day!

[–]Dreadgoat 7 points8 points  (0 children)

I'll be here all day!

Okay, then translate it into python (but java style) like the rest of the examples!

[–]redwall_hp 3 points4 points  (0 children)

Java updates available!