Here's how you count it (without counting it).

The range is 1 to 100. Since 100 does not contain any sixes, we can say it's 1 to 99.

So, there are at most 2 digits. The single-digit numbers can also be represented as two-digit strings, with 0 as the first digit.

If the first digit is 6, then the second digit can be 0, 1, ... 9, and this gives 10 numbers.

If the second digit is 6, then the first digit can be 0, 1, ... 9, and this also gives 10 numbers.

Both these have 66 in common, so there are 10 + 10 - 1 = 19 numbers containing 6, between 1 and 100.

As to how many 6s you'll pass, each of these 19 numbers, has exactly one 6, except for 66, which has two. So 18 + 2*1 = 20. Thus, you will pass twenty 6s on the way from 1 to 100.

The advantage of this procedure is that it can be used for bigger ranges also. For example, from 1 to 1000:

If the first digit is 6, the remaining two places can be filled in a 10*10 = 100 ways.

If the second digit is 6, the remaining two places can be filled in 10*10 = 100 ways.

If the third digit is 6, the remaining two places can be filled in 10*10 = 100 ways.

Some of these numbers have been counted more than once. These are the numbers which contain more than one 6. But they will be counted exactly as many times as the number of 6s they contain. Therefore, the total number of 6s you will pass on the way from 1 to 1000 is 300.

Similarly, if the range is 1 to 10^n, there will be n*(10^(n - 1)) 6s (or of any digit other than 0).

Hello!

Welcome To Mybestanswer

In this kind of problem, a listing is very helpful:

6, 16, 26, 36, 46, 56, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 76, 86, 96.

We may count the amount of terms in the list and we find that there are 19 terms which have a 6 in them in the list of numbers from 1 to 100 inclusive.

After reading some of the other posts, I think that if you were to read the question as asking: "how many integers between 1 and 100 inclusive have a six?"; then my solution above is correct. If you read the question as "how many sixes are there in the integers 1 to 100 inclusive, then they are correct that 20 is the response.

20 is the answer. You pass by 20 not 19.

Here they are: 6,16,26,36,46,56,60,61,62,63,64,65,66,67,68,69,76,86,96

You have to remember that there are 2 6's in 66 that's how i got 20!

CORRECTION...it would be 20! See below...

6, 16, 26, 36, 46, 56, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 76, 86, 96

Remember there are two 6's at number 66!