Question: Read a positive integer input n, and count the number of occurrences of the digit '9' in the decimal representation of all the numbers between 1 and n inclusive. Print that number.
For instance:
Number? 19
2
Maybe the easiest way to do this is to convert each number from 1 to n to a string, and then count the number of "9" characters in that string.