title: Fact=fact*c ?? How does that work? (Factorial Java)
body: <pre><code>import java.util.Scanner;
  
  class Factorial {
  public static void main(String args[]) {
    int n, c, fact = 1;
  
    System.out.println("Enter an integer to calculate it's factorial");
    Scanner in = new Scanner(System.in);
    n = in.nextInt();
  
    if ( n &lt; 0 )
       System.out.println("Number should be non-negative.");
    else
    {
       for ( c = 1 ; c &lt;= n ; c++ )
          fact = fact*c; 
  
       System.out.println("Factorial of "+n+" is = "+fact);
    }
   }
  }
  </code></pre>
  
  <p>For this code for finding the factorial of a number, I don't get the part where it says, "fact=fact*c".
  I know it's because fact gets "updated" with a new multiplication factor of c, but do the numbers multiply? </p>
  
  <p><strong>Example: n=3 and c=1,2,3 and fact=1.. then would the process look like, (1*1) * (1*2) * (1*3)= 6?</strong> </p>