7 lines
68 B
Chapel
7 lines
68 B
Chapel
proc fac(n) {
|
|
var r = 1;
|
|
for i in 1..n do
|
|
r *= i;
|
|
|
|
return r;
|
|
}
|