Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int product(list[] a){
- if (a.length == 0) {
- return 1; // basfall
- } elseif(a[a.length() - 1] % 2 == 0) {
- return a[a.length() - 1] * product(a.remove(a.length - 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement