Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- recurseMethod(4);
- factorial(5);
- }//end method main
- public static double factorial(double d) {
- //Sort elements by title case.
- if (d <= 1) {
- return 1;
- }
- else {
- return d * factorial(d - 1);
- }//endif
- }//end method factorial
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement