Soru

1 + 2 + … + n toplamını özyinelemeli döndür (n ≥ 0).

Örnekler

  • toplamN(3) → 6
  • toplamN(0) → 0
Derle ve test et (Ctrl+Enter)