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

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]));
}
}