Problem

Return n + (n-1) + ... + 1 for n >= 0 using a while loop.

Examples

  • countDownSum(4) -> 10
  • countDownSum(0) -> 0
Compile and test (Ctrl+Enter)