summaryrefslogtreecommitdiff
path: root/examples/gfcc/factorial.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gfcc/factorial.c')
-rw-r--r--examples/gfcc/factorial.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/examples/gfcc/factorial.c b/examples/gfcc/factorial.c
deleted file mode 100644
index 76fee32d0..000000000
--- a/examples/gfcc/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 ;
-} ;
-