0

# What is the sum of a two digit number less the sum of its digits?

Updated: 12/24/2022

Wiki User

15y ago

There exist no numbers which are less than the sum of their digits.

This is obvious for single digit numbers, since each number would be exactly equal to the sum of its digits.

For multi-digit numbers, this still holds true. Let's take a two digit number in the form: ab. Where a and b represent the digits of this number.

The sum of the digits of ab = a + b.

The number ab = a*10 + b.

It should now be obvious that ab will always be greater than a + b.

For larger numbers, the difference between the sum of digits and the number only grows, as a number abc = a*100 + b*10 + c, abcd = a*1000 + b*100 + c*10 + d, etc.

Proof by exhaustion (via Java code, since this is listed in the programming category):

for (int n = 10; n <= 99; ++n) {

int _n = n;

int sumDigits = 0;

while (_n != 0) {

sumDigits += _n % 10;

_n /= 10;

}

if (n < sumDigits) {

// This code is never reached, since n >= sumDigits for all 10 <= n <= 99

System.out.println(n + " < " + sumDigits);

}

}

Wiki User

15y ago