Factorial loop results are incorrect after the 5th iteration
<p>I am currently taking pre-calculus and thought that I would make a quick program that would give me the results of factorial 10. While testing it I noticed that I was getting incorrect results after the 5th iteration. However, the first 4 iterations are correct.</p>

<pre><code>public class Factorial
{
    public static void main(String[] args)
    {

        int x = 1;
        int factorial;

        for(int n = 10; n!=1; n--)
        {

            factorial = n*(n-1);
            x = x * factorial;
            System.out.printf("%d ", x);

        }

    }//end of class main
}//end of class factorial
</code></pre>

<p><img src="http://i.stack.imgur.com/NTJgu.jpg" alt="Why am I getting negative values"></p>
