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
- Sum of Two — Easy
- Tip Total — Easy
- Leap Year — Easy
- FizzBuzz — Easy
- Hex to Decimal — Easy
- Parking Fee — Easy