From 27987606881f12aa387b6c978b56433cf9170fdb Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Sat, 4 Jan 2014 23:39:29 +0100 Subject: [PATCH] new sample - RekFib --- samples/RekFib.mj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 samples/RekFib.mj diff --git a/samples/RekFib.mj b/samples/RekFib.mj new file mode 100644 index 0000000..1c297e5 --- /dev/null +++ b/samples/RekFib.mj @@ -0,0 +1,16 @@ +program RekFib{ + + int fib(int f) + { + if (f==0) return 0; + if (f==1) return 1; + return fib(f-1)+fib(f-2) ; + } + + void main() + int i; + { + print(fib(0)); + print(fib(7)); + } +} \ No newline at end of file -- 2.25.1