2018-05-23 13:38:41 +00:00
|
|
|
import java.lang.Integer;
|
2018-08-01 12:03:23 +00:00
|
|
|
//import java.lang.Double;
|
2018-05-23 13:38:41 +00:00
|
|
|
|
2018-05-29 22:27:20 +00:00
|
|
|
public class Fac {
|
2018-05-23 13:38:41 +00:00
|
|
|
|
2021-05-21 07:52:22 +00:00
|
|
|
getFac(n){
|
2018-05-23 13:38:41 +00:00
|
|
|
var res = 1;
|
|
|
|
var i = 1;
|
|
|
|
while(i<=n) {
|
|
|
|
res = res * i;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|