pick a three-digit number (for example: 412)
repeat the series of digits to create a six-digit number (412412)
divide the number resulting from the previous step by 7 (58916)
divide the number resulting from the previous step by 11 (5356)
divide the number resulting from the previous step by 13 (412)
Why does none of the (integer) divisions in steps 3, 4 and 5 gives a remainder? Why does this procedure always results in the original three-digit number? The answer to these questions may lead you to a simple implementation of a program that reads a three-digit number from input, and prints the numbers resulting from steps 2–5.
A three-digit integer.
The series of four integers, each on a separate line, that result when applying steps 2–5 to the three-digit integer read from input.
Input:
412
Output:
412412
58916
5356
412