forked from JavaTX/JavaCompilerCore
16 lines
200 B
Plaintext
16 lines
200 B
Plaintext
|
import java.lang.Integer;
|
||
|
import java.lang.Long;
|
||
|
import java.lang.Double;
|
||
|
|
||
|
public class Fac {
|
||
|
|
||
|
getFac(n){
|
||
|
var res = 1;
|
||
|
var i = 1;
|
||
|
while(i<=n) {
|
||
|
res = res * i;
|
||
|
i++;
|
||
|
}
|
||
|
return res;
|
||
|
}
|
||
|
}
|