Even Steps (Baby Steps)
Hop only on even stones. Given n, print every even number from 2 up to n, one on each line.
Input: One integer n (2 to 200).
Output: The even numbers 2, 4, 6, … up to n, one per line.
Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Loop from 1 to n and print a number only if it is even.