Codeblocks help!

I need to generate the even numbers from 10 to 30 (inclusive)
I'm having struggles on what code to write for it. If anyone could write the code for me, just so I have a basic concept it and apply it similarly for other tasks i have to do.

The easiest way is probably to use a for loop from i=10 to 30 and have i go up by 2 each time:
1
2
for (int i = 10; i <= 30; i += 2)
    // Work with i here 
Topic archived. No new replies allowed.