In this particular code, I think you are printing those numbers in which all the digits are even. So, till 2888 all the digits in this number i.e 2,8,8,8 are even number. After 2888 it is 2889, 2890 and 2891 etc, there is an odd number which is 9 and there will be one odd digit in every number after 2888 till 3001 which will not get printed.