CJCoding With Joseph
15free / daySign inCreate account

Print all the even numbers from 2 up to and including 10, each on its own line. Instead of adding 1 each time, make your loop counter jump by 2 so it lands only on even numbers. Start at 2 and keep going while the counter is less than or equal to 10.

Expected output

2
4
6
8
10

= newline. The output ends with a newline, so print one after the last line.

Hints2 available
Topics
Loops
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.