about | help | code help+videos | done | prefs |
Define a function that when passed the parameters of an arithmetic progression, namely, the value of the first item, the change from one value to the next, and the next of terms, returns the sum of the series. For example, 10, 2, 3 represents a series of 3 items starting at 10 and each item is 2 more than the one before. Mathematically, this can be done without a loop as well. sumSeries(1, 1, 10) → 55 sumSeries(1, 2, 5) → 25 sumSeries(10, 2, 3) → 36 ...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: 2 Post-solution available
Copyright Nick Parlante 2017 - privacy