about | help | code help+videos | done | prefs |
recur_sumEvenNumbers
Given an integer "n", return the sum of all even numbers starting with 2 up to and including n. For example, if "n" is the number 10, you should do 2+4+6+8+10 which is 30. The given integer "sum" will always start at 0. recur_sumEvenNumbers(10, 0) → 30 recur_sumEvenNumbers(1, 0) → 0 recur_sumEvenNumbers(2, 0) → 2 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy