about | help | code help+videos | done | prefs |
Write a method that accepts a positive even integer parameter, num, then returns the product of all the positive even integers less than or equal to num (as a long). For example, evenProduct(8) returns 384 because 2*4*6*8=384. This method can be done recursively, but you are NOT required to solve it that way. evenProduct(2) → 2 evenProduct(4) → 8 evenProduct(6) → 48 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 330
Copyright Nick Parlante 2017 - privacy