gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
samples - rekfib1, simplify for now
authorDoni Pracner <quinnuendo@gmail.com>
Wed, 8 Jan 2014 21:11:10 +0000 (22:11 +0100)
committerDoni Pracner <quinnuendo@gmail.com>
Wed, 8 Jan 2014 21:11:10 +0000 (22:11 +0100)
samples/RekFib.mj

index 1c297e5a3244cb372a2a29ea9dffb44368826f86..6f324b3743d58700833e2550c45ff131c5aae181 100644 (file)
@@ -4,13 +4,11 @@ program RekFib{
        {
                if (f==0) return 0;
                if (f==1) return 1;
-               return fib(f-1)+fib(f-2) ;
+               return fib(f-2)+fib(f-1) ;
        }
        
        void main()
-       int i;
        {
-               print(fib(0));
-               print(fib(7));
+               print(fib(2));
        }
 }
\ No newline at end of file
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner