How many times does the number 2 appear between 1 and 100?
The digit 2 between 1 to 100 will comes 20 times. 10 times from *2 (i.e. 02, 12, 22, 32, 42, 52, 62, 72, 82, 92) and other 10 times from 2* (i.e. 20, 21, 22, 23, 24, 25, 26, 27, 28, 29).Also to know is, how many times does the digit 2 occur between 1 and 100?Input : 22 Output : 6 Explanation: Total ...