/*  Recursive factorial function in Java by www.computing.me.uk */

class Factorial
{
	public static void main(String args[])
	{

//Place the number for which the factorial is to be found withing the brackets
		System.out.println(factorial(5));

	}


/* Recursive factorial function

        static int factorial(int n)
        {
	        if (n==1) return(1);
                else return (n*factorial(n-1));
        }



/* A non-recursive alternative method for determining the factorial of a number */
/*
        static int factorial(int n)
        {
		int value=1;
		for (int i=2; i<=n; i++)
			{
				value=value*i;
			}
		return(value);
	}

*/












static int fibonacci(int n)
{
	if (n<=2) return(1);
	else return(fibonacci(n-1)+fibonacci(n-2));
}


}
