gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
moved version.properties to a class subfolder to prevent conflicts
[mjc2wsl.git] / samples / RekFib.mj
index 1c297e5..d3a59a5 100644 (file)
@@ -2,15 +2,17 @@ program RekFib{
 
        int fib(int f)
        {
-               if (f==0) return 0;
-               if (f==1) return 1;
-               return fib(f-1)+fib(f-2) ;
+               if (f==0) 
+                       return 0;
+               if (f==1) 
+                       return 1;
+               return fib(f-2)+fib(f-1) ;
        }
        
        void main()
-       int i;
        {
-               print(fib(0));
-               print(fib(7));
+               print(fib(0),3);
+               print(fib(2),3);
+               print(fib(7),3);
        }
 }
\ No newline at end of file
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner