The function \(S(n)\) is defined for positive integers \(n\) by \[S(n) = \text{sum of the digits of }n.\] For example, \(S(723) = 7+2+3=12\). The sum \[S(1) + S(2) + S(3) + \dots + S(99)\] equals
\(746\),
\(862\),
\(900\),
\(924\).
Could we lay out the \(S\) values in a table?
How often does the digit \(1\) appear in the numbers from \(1\) to \(99\)?
What about the other digits?