Let's divide 875112 by 40
Our goal is to divide 875112 by 40.

On to step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 8 to get 8.
Fetch the next digit (7) from the dividend, attach it to 8 and continue: 87 / 40

Step 2:
87 divided by 40 is 2 with a remainder of 7.
Write down 2 as next digit of the result. 
Result so far: 2.0
If we subtract 80 from 87, we get 7.
Append the next digit (5) from the dividend to 7 and continue with: 75 / 40

Moving on to step 3:
40 can be fit into 75 1 times, resulting in a remainder of 35.
Use 1 as the next digit of our solution. 
Result so far: 21.0
Subtracting 40 from 75 leaves us with 35.
Fetch the next digit (1) from the dividend, attach it to 35 and continue: 351 / 40

On to step 4:
351 divided by 40 is 8 with a remainder of 31.
The number 8 becomes the next digit in our result. 
Result so far: 218.0
Subtracting 320 from 351 leaves us with 31.
Include the next digit (1) from the dividend after 31, then repeat: 311 / 40

Step 5:
311 divided by 40 is 7 with a remainder of 31.
Put 7 as the next digit of the answer. 
Result so far: 2187.0
If we take 280 away from 311, we end up with 31.
Take the next digit (2) from the dividend and append it to 31, then repeat: 312 / 40

Going ahead to step 6:
312 divided by 40 is 7 with a remainder of 32.
The number 7 becomes the next digit in our result. 
Result so far: 21877.0
Subtract 280 from 312 to get 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Going ahead to step 7:
When dividing 320 by 40, we get 8 with a remainder of 0.
The number 8 becomes the next digit in our result. 
Result so far: 21877.8
Deduct 320 from 320 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 8:
40 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21877.8
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21877.8
Subtract 0 from 0 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

After the division, we end up with 21877.8 and a remainder of 0.0.