How to shorten nested if-expressions?
<p>Is it possible to somehow shorten many if-expressions?
Example: imagine 3 numbers, and each will only count up if the former one reached count of 10.</p>

<pre><code>int a = 0, b = 0, c = 0;

a++;
if (a == 10) {
    a = 0;
    b++;
    if (b == 10) {
        b = 0;
        c++;
    }
}

return toString(a+b+c); //I know this is not valid
</code></pre>

<p>Is it possible to somehow shorten these kind of expressions?</p>
