asked 183k views
2 votes
Write the sum of first n natural numbers.​

1 Answer

3 votes

The sum of the first n natural number = n * (n+1) / 2, for n a natural number.

For example, you want to calculate the sum and average of any five numbers entered by the user. i.e., If you want to calculate the sum and average or percentage of multiple user-entered numbers, then please refer to the following program.

answered
User Asvd
by
7.6k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.