**Programming** Examples

# Python program to input any number and to print all natural numbers up to given number

Write a program to input any number and to print all natural numbers up to given number.

`Solution`

```
n = input("enter any number")
for i in range(1,n+1):
print i
```

`Output`

enter any number 10

1 2 3 4 5 6 7 8 9 10