answersLogoWhite

0

int sum = 0;

int i;

for(i = 0; i < n; ++i) {

sum += i;

}

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
BeauBeau
You're doing better than you think!
Chat with Beau
More answers

n+(n-1)+(n-2)...

* * * * *

=n*(n + 1)/2

User Avatar

Wiki User

14y ago
User Avatar

The first prime numbers are 2 and 3. Their sum is 5.

User Avatar

Wiki User

15y ago
User Avatar

The sum of the first prime numbers is 5

Because the first prime numbers are 2 & 3.

Thus , 2 + 3 =5

The sum is 5

I hope you understand my reason for my answer.

By grade 4 th student

byeee

User Avatar

MARYAM MULLA

Lvl 2
3y ago
User Avatar

it is n(n+1)/2

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What is the Sum of first n natural numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp