Update Test_2.java
This commit is contained in:
@@ -8,5 +8,9 @@ public class Test_2{
|
|||||||
}
|
}
|
||||||
return n * factorial(n-1);
|
return n * factorial(n-1);
|
||||||
}
|
}
|
||||||
int result = this.factorial(5);
|
public static void main(String[] args) {
|
||||||
|
Test_2 obj = new Test_2();
|
||||||
|
int result = obj.factorial(5);
|
||||||
|
System.out.println("Factorial: " + result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user