Math, asked by mandabind937, 4 months ago

how many time does the digit 2 occur between 1 and 100






Answers

Answered by MissLaiba
5

Step-by-step explanation:

Input : 22 Output : 6 Explanation: Total 2s that appear as digit from 0 to 22 are (2, 12, 20, 21, 22); Input : 100 Output : 20 Explanation: total 2's comes between 0 to 100 are (2, 12, 20, 21, 22..29, 32, 42, 52, 62, 72, 82, 92);

Similar questions