diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:54:35 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:54:35 +0000 |
| commit | e9e80fc389365e24d4300d7d5390c7d833a96c50 (patch) | |
| tree | f0b58473adaa670bd8fc52ada419d8cad470ee03 /examples/gfcc/compiler/factorial.c | |
| parent | b96b36f43de3e2f8b58d5f539daa6f6d47f25870 (diff) | |
changed names of resource-1.3; added a note on homepage on release
Diffstat (limited to 'examples/gfcc/compiler/factorial.c')
| -rw-r--r-- | examples/gfcc/compiler/factorial.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/examples/gfcc/compiler/factorial.c b/examples/gfcc/compiler/factorial.c deleted file mode 100644 index 76fee32d0..000000000 --- a/examples/gfcc/compiler/factorial.c +++ /dev/null @@ -1,38 +0,0 @@ -int fact (int n) { - int f ; - f = 1 ; - { - while (1 < n) { - f = n * f ; - n = n - 1 ; - } - } - 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)) ; - printf("%d",factr(n)) ; - n = n+1 ; - } - } - return ; -} ; - |
