X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=tests%2FFib.java;h=871b03f32592e8fb665a98eda5e7c307b3f16776;hb=fbd2a5f852ab4f94c0a0c20f7a572c99e75f9daf;hp=b91671634269ef3e2f4a45ea60b9740123d10997;hpb=c6617c05281181cff00beb55efc802755dc42f6e;p=mate.git diff --git a/tests/Fib.java b/tests/Fib.java index b916716..871b03f 100644 --- a/tests/Fib.java +++ b/tests/Fib.java @@ -1,13 +1,14 @@ -public class Fib -{ - public static int fib(int n) - { - if(n<=1) return 1; - else return fib(n-1) + fib(n-2); +package tests; + +public class Fib { + public static int fib(int n) { + if (n <= 1) + return 1; + else + return fib(n - 1) + fib(n - 2); } - public static void main(String[] args) - { - fib(10); + public static void main(String[] args) { + System.out.printf("result: 0x%08x\n", fib(20)); } }