1
0
forked from GitHub/gf-core

gfcc report

This commit is contained in:
aarne
2004-09-28 19:44:02 +00:00
parent 55c603ba87
commit 57ff3cc5a3
11 changed files with 137 additions and 71 deletions

View File

@@ -10,11 +10,28 @@ int fact (int n) {
return f ;
} ;
int factr (int n) {
int f ;
{
if (n < 2) {
f = 1 ;
}
else {
f = n * factr (n-1) ;
}
}
return f ;
} ;
int main () {
int n ;
n = 1 ;
{
while (n < 11) printf("%d",fact(n)) ; n = n+1 ;
while (n < 11) {
printf("%d",fact(n)) ;
printf("%d",factr(n)) ;
n = n+1 ;
}
}
return ;
} ;