Because what you said here, I figured you wanted the value of printVal to be one under, or to, instead of equaling countLimit. You can leave the +1 so that they are the same, or you could write it as.. } while ( printVal <= countLimit);
Which means, 'less than equals'. Looks better, IMHO, than the +1
As an aside, You should also have something printed to screen before the scanf, telling the user what is expected. Like printf("Type in a number, please..\n");