Write a function sumTo(n) that calculates the sum of numbers 1 + 2 + ... + n . For instance: ... Using the arithmetic progression formula.
確定! 回上一頁