Even Numbers Up To N

Easy · rating 850 · Implementation, Math

Read an integer n. Print all even numbers from 1 to n inclusive, in increasing order, space-separated on one line. If there are none, print an empty line.

Constraints: 1 ≤ n ≤ 104

Related problems

Open Even Numbers Up To N in Code Arena →