answersLogoWhite

0

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

Still curious? Ask our experts.

Chat with our AI personalities

ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor

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