I've thought about this problem the following way. If this was represented by 3 dials which have number 0-9 in them ([0-9][0-9][0-9]) then the chance of hitting 9 in one of them is 1/10. Since there are 3 dials it's 3 * 1/10 = 3/10.
Hence the number of whole numbers between 0-999 having having the digit 9 is 999 * 0.3 = 299.7 (or 300).
Have I done a mistake in my way of calculation and way I've visualised the problem? And why does it result in a number which isn't whole (299.7)?