Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int somasRecursivas(int num1, int num2) {
- if (num1 > 0 && num2 > 0){
- if (num2 == 0) {
- return num2;
- } else {
- return num1 + somasRecursivas(num1, num2 - 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement