Computer Science, asked by shivaleelanaikodi, 6 months ago

write an algorithm to print natural number up to n​

Answers

Answered by VISHALKUMARV22
5

Answer:

i=1

num=int(input('Enter a number '))

while i<=num:

   print i,

   i=i+1

Explanation:

1.  Assign i=1

2.  Read a number, num

3. Repeat step 4&5 until i=num reach

4.  Print i

5.  Compute i=i+1

Similar questions