forked from GitHub/gf-core
10 lines
110 B
C
10 lines
110 B
C
int fact (int n) {
|
|
int f ;
|
|
f = 1 ;
|
|
while (1 < n) {
|
|
f = n * f ;
|
|
n = n - 1 ;
|
|
}
|
|
return f ;
|
|
} ;
|