need help!

hi evry1. i need to compile a prog which generates even numbers from 1 tp 20 without using conditional statements(if, else if)...just using for loop.
thnx
for ( int i = 2; i <= 20; i += 2 ) std::cout << i << ' ';
Last edited on
Topic archived. No new replies allowed.