Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. public static int product(list[] a){
  2.     if (a.length == 0) {
  3.         return 1; // basfall
  4.  
  5.     } elseif(a[a.length() - 1] % 2 == 0) {
  6.         return a[a.length() - 1] * product(a.remove(a.length - 1);
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement