<pre lang="java"><pre>public class Main { static int a = 0; static int b = 0; public static void main(String[] args) { int n = Integer.parseInt(args[0]); a = Integer.parseInt(args[1]); b = Integer.parseInt(args[2]); for (int i = 0; i <= n; i++){ System.out.print(recursiv(i));} } public static long recursiv(int n) { if (n >= 0 && n <= 2) return 1; else return a * recursiv(n - 2) + b * recursiv(n - 3); } }
for (int i = 0; i <= n; i++){ System.out.print(recursiv(i)); System.out.print(","); }
public static void main(String[] args) { System.out.print(String.join(",", args); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)