aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-09-18 20:13:23 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-09-18 20:13:23 +0000
commit4e184742583aa4c65e9073c2767124af5117ee50 (patch)
treeb5ed6e0ef5bda832401eaffc2dd9f7f2110e7d04 /doc
parent90ab9d7555614e7cd322e6373fca36d414ee9393 (diff)
downloadcflow-4e184742583aa4c65e9073c2767124af5117ee50.tar.gz
cflow-4e184742583aa4c65e9073c2767124af5117ee50.tar.bz2
New sample source
Diffstat (limited to 'doc')
-rw-r--r--doc/ack.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/ack.c b/doc/ack.c
new file mode 100644
index 0000000..46fd304
--- /dev/null
+++ b/doc/ack.c
@@ -0,0 +1,14 @@
+/* Ackermann's function */
+
+typedef unsigned long u_long;
+
+u_long
+ack (u_long a, u_long b)
+{
+ if (a == 0)
+ return b + 1;
+ if (b == 0)
+ return ack (a - 1, 1);
+ return ack (a - 1, ack (a, b - 1));
+}
+

Return to:

Send suggestions and report system problems to the System administrator.