Java Factorial factorial(final int a)

Here you can find the source of factorial(final int a)

Description

factorial

License

Open Source License

Declaration

public static int factorial(final int a) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static int factorial(final int a) {
        int factorialVal = 1;
        for (int i = 2; i <= a; i++) {
            factorialVal = factorialVal * i;
        }/*from   w  w w  .  ja v a2 s  . c  o  m*/
        return factorialVal;
    }
}

Related

  1. factorial(double n)
  2. factorial(double n)
  3. factorial(final long value)
  4. factorial(int c)
  5. factorial(int i)
  6. factorial(int input)