Files
gf-core/examples/gfcc/compiler/factorial.c
2004-09-26 15:44:08 +00:00

22 lines
229 B
C

int fact (int n) {
int f ;
f = 1 ;
{
while (1 < n) {
f = n * f ;
n = n - 1 ;
}
}
return f ;
} ;
int main () {
int n ;
n = 1 ;
{
while (n < 11) printf("%d",fact(n)) ; n = n+1 ;
}
return ;
} ;