answersLogoWhite

0


Best Answer

Algorithm to find the sum of first n natural numbers:
1. Read n.
2. Initialize N=1.
3. Initialize sum S=0.
4. Calculate S=S+N.
5. Calculate N=N+1.
6. If N>n, then goto step 7 else goto step 4.
7. Write the sum S.
8. Stop.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program to calculate the sum of first ten natural numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the program to calculate the average of first 'n' natural numbers?

printf ("%g\n", (n+1.0)/2);


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


What is the sum of the first 200 natural numbers the first 200 whole numbers?

Look up Gauss' Formula if you want to know how to calculate this. If you just want the answer, it's 20100.


How do you write a program to find out the square and cube of first ten natural numbers in gw basic?

First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.


Write a program to calculate first?

int first= 1;


What is the smallest multiple of the first ten natural numbers?

2520 is the smallest multiple of of first ten natural numbers.


What is the sum of 50 natural numbers?

The sum of the first 50 natural numbers is 1,251.


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.


The variance of first n natural numbers is?

1 Sum of first n natural numbers = n(n+1)2[Formula.]2 Arthmetic mean of first n natural numbers = Sum of the numbers n[Formula.]3 = n(n+1)2n = n+124 So, the Arthmetic mean of first n natural numbers = n+12


What is the product of the first five natural numbers?

Good question. 1+2+3+4+5=155=15 So the product of first five natural numbers is fifteen Natural numbers starts from one So we add first five natural numbers and get the right answer is fifteen


What is sum of natural numbers between 200?

The sum of the first 200 natural numbers is 20,001.


What is the first natural numbers?

123456789101112131415.