Python program to print all natural numbers up to the given number


Write a program in python to print all natural numbers up to the given number

-------------------------------------

num = int(input("enter any number : "))

for i in range(1,num+1):

    print (i)

-------------------------------------

Output :-

enter any number : 11

1

2

3

4

5

6

7

8

9

10

11

Post a Comment

0 Comments