227k views
2 votes
Write an algorithm to print the natural numbers from 1 to 15​

1 Answer

5 votes

Answer:

1. n = [ ]

2. i = 0

3. j = i + 1

4. i = j

5. append i to n

6. Repeat 3 to 5

7. Stop when i = 15

User TheKidsWantDjent
by
4.4k points