Y
Hacker News
new
|
ask
|
show
|
jobs
by
dreamcompiler
1735 days ago
The way you add the integers up to n is
n(n+1)/2.
Fixed that for you. No loops, and it's exact. Pick a better example.