We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8e32b0 commit 23fca76Copy full SHA for 23fca76
Roadmap/06 - RECURSIVIDAD/java/pguillo02.java
@@ -20,7 +20,7 @@ public static void recursiva(int n) {
20
21
public static int factorial(int n){
22
if (n == 0){
23
- System.out.println(1);
+ return 1;
24
} else{
25
return n*factorial(n-1);
26
}
0 commit comments