This commit is contained in:
EmmanuelTiamzon
2025-11-12 11:16:54 +01:00
parent baa90530f9
commit 77e2c58445
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
public class Fibonacci {
public Fibonacci() {
}
public int form(int val) {
if(val == 0) {
return 0;
} else if(val == 1) {
return 1;
} else {
return form(val -1) + form(val -2);
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,23 @@
public class Appels {
public Appels(int val) {
int indentation = 0;
fact(val, indentation);
}
public int fact(int nb, int indentation) {
if(nb > 0) {
System.out.println(" ");
return nb*fact(nb-1,indentation++);
} else {
Thread.dumpStack();
return 1;
}
System.out.println(nb+"! = "+fact(nb, indentation));
}
public static void main(String[] args) {
new Appels(Integer.parseInt(args[0]));
}
}

View File

@@ -0,0 +1,5 @@
public class Tableaux {
public Tableaux() {
}
}