A computer multiplied nine 100 times. You can use patterns to find the ones digit of the product.?-Collection of common programming errors

  • Assume Ds are undefined digits: DDD9 X 9 = DDD1 DDD1 X 9 = DDD9 The first time (9X9) is like the first one (Ds are all 0). The second time, the ones digit returns to 9. The next multiplication is like the first example, so we are in a loop.

    If we say the 1st line is (2) 9s multiplied, then every even number of multiplications results in a “1” as the 1s digit.

  • Originally posted 2013-11-09 23:33:32.