15 lines
204 B
Plaintext
15 lines
204 B
Plaintext
|
import java.lang.Integer;
|
||
|
import java.lang.Double;
|
||
|
import java.lang.String;
|
||
|
|
||
|
public class Fac {
|
||
|
getFac(n) {
|
||
|
var res = 1;
|
||
|
var i = 1;
|
||
|
while (i <= n) {
|
||
|
res = res * i;
|
||
|
i++;
|
||
|
}
|
||
|
return res;
|
||
|
}
|
||
|
}
|