how many whole numbers from 100 to 1000 contain the digit 6 exactly twice?

Sorry about the other post, it's wrong.

number of cases:

(X is any digit except 6)
6XX = 9X9 = 81
X6X = 8x9 = 72 , can't have 0 at the front
XX6 = 8x9 = 72
66X = 9
6X6 = 9
X66 = 8
Number of cases = add them up

No problem! Let's find the correct answer together.

To determine how many whole numbers from 100 to 1000 contain the digit 6 exactly twice, we can break down the problem into two cases:

Case 1: The digit 6 is in the hundreds place.
In this case, we have three digits to work with, and we need to determine how many options we have for each digit.

For the hundreds place, we have 1 option (6).

For the tens and units places, we need to consider that we have 10 options (0-9) for each digit, except for the digit 6. We subtract 1 from each place because we want to exclude the digit 6, which is already accounted for in the hundreds place. Therefore, we have 10 - 1 = 9 options for each of the tens and units places.

The total number of possibilities in this case is 1 * 9 * 9 = 81.

Case 2: The digit 6 is in the tens place.
In this case, we also have three digits to work with.

For the tens place, we have 1 option (6).

For the hundreds and units places, we have 10 - 1 = 9 options for each digit, since we want to exclude the digit 6.

The total number of possibilities in this case is 1 * 9 * 9 = 81.

Case 3: The digit 6 is in the units place.
Following the same approach as before, we find that the total number of possibilities in this case is also 81.

To get the final answer, we sum up the results from all three cases:
81 + 81 + 81 = 243

Hence, there are 243 whole numbers from 100 to 1000 (inclusive) that contain the digit 6 exactly twice.