All problems

Problem 796

Print Numbers from 1 to N

Easy · 10 pts · Basics, Loops

Problem

Print all integers from 1 to N in increasing order, separated by single spaces. This is the very first loop exercise: start a counter at 1, print it, and increase it by one until it passes N. All the numbers go on one line, with a single space between neighbours.

Input

A single integer N.

Output

Print the numbers 1 to N separated by spaces.

Constraints

1 <= N <= 10000

Example input

5

Example output

1 2 3 4 5

Explanation

For N = 5 the numbers are 1, 2, 3, 4 and 5, printed as 1 2 3 4 5.

Every problem here can be used in a RelayTrixCode team match. Create a room.

Previous: Power of a Number Next: FizzBuzz