Artificial intelligent assistant

Converting Decimal number to 10's complement Is there any other way to convert a decimal number to 10's complement without substraction? Not this method: Converting 052784: 100000-052784 = 947216

In short, no: the fact that subtraction is involved is suggested by the word "complement".

The usual procedure is to ignore any leading zeros, subtract the lowest-order non-zero digit from 10 and all the remaining digits from 9.

Addition and subtraction are computationally fast compared to other operations. As you can see in your example, one measly subtraction (that takes about a billionth of a second in a computer) and you're finished.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ecd7e335413f4d17937d8cb4c1976977