document.write( "Question 465807: In the first 99 natural numbers, digit 4 comes how many times?\r
\n" ); document.write( "\n" ); document.write( "I got 4,14,24,34,40,41,42,43,44,45,46,47,48,49,54,64,74,84,94 (19 times)
\n" ); document.write( "But the answer written in my book is 20 times.\r
\n" ); document.write( "\n" ); document.write( "Which number am i missing?
\n" ); document.write( "

Algebra.Com's Answer #319308 by richard1234(7193)\"\" \"About 
You can put this solution on YOUR website!
44 has two fours. There are 19 numbers, but 20 4's.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "An easier way to count them is to list the numbers by unit digit and by tens digit, and always use the ellipsis (...) if necessary. You can organize them into sets like {4, 14, ...,94} and {40, 41, ..., 49}. Without writing every term you can easily count the number of elements by doing certain transformations like\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "{4, 14, ..., 94} --> {0, 1, ..., 9} (removed 4's) --> {1, 2, ..., 10} (added 1), 10 elements.
\n" ); document.write( "
\n" );