how many whole numbers from 1 to 100 contain the digit 2?
There are 18 whole numbers from 1 to 100 that contain the digit 2 exactly once. They are 2, 12, 20, 21, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, and 92.