Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double backward(double limit) {
- // Declare local variable.
- double num = 5;
- if (limit <= 1)//base case
- return num;
- else
- return backward(limit - 1) + num;
- //endif
- }//end method backward
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement