You need two things to do this. Firstly, you need to make a for loop that runs over all the numbers. Secondly, you need to use the % operator on each. % gives you the "remainder" of an integer division. If you divide an integer by 2 and look at the remainder, it will be 0 for even numbers and 1 for odd numbers:

x % 2 == 0; // if x is even
y % 2 == 1; // if y is odd

Have a play with those ideas and see how you get on. Post your code if you have any further problems

I have the following problem.
when i pres buttun printpreview (button 5) the the print preview fires up.
and when i close the print preview without printing and minimize the ...