summaryrefslogtreecommitdiff
path: root/examples/gfcc/factorial.c
diff options
context:
space:
mode:
authorjohn.j.camilleri <john.j.camilleri@chalmers.se>2013-09-16 07:17:27 +0000
committerjohn.j.camilleri <john.j.camilleri@chalmers.se>2013-09-16 07:17:27 +0000
commitf5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 (patch)
tree946c9e8542b8e8271b6b529a95c0400fa6613cb4 /examples/gfcc/factorial.c
parent8e1c6cca407c82fc09569d80c231b8d256735989 (diff)
Remove contribs and examples
Everything has now been moved to a separate repository at https://github.com/GrammaticalFramework/gf-contrib The contents of the examples folder are build during SetupWeb
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 ;
-} ;
-