public class Cvicenie1T {
public static void main(String[] args) {
System.out.println(sucet(3, 5));
System.out.println(rastuce(new int[]{1,2,3,4,4,5,6}, 1));
}
public static int fibonacci(int n) {
if (n == 0)
return 0;
if (n == 1)
return 1;
return fibonacci(n - 2) + fibonacci(n - 1);
}
public static int sucet(int a, int b) {
if (b == 0)
return a;
return sucet(a + 1, b - 1);
}
public static boolean rastuce(int[] p, int odPolicka) {
if (odPolicka == p.length-1) {
return true;
}
return (p[odPolicka] <= p[odPolicka + 1]) && (rastuce(p, odPolicka + 1));
}
}