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

Advancing to step 1:
If we divide 2 by 40, we get 0 and a remainder of 2.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 2, we get 2.
Take the next digit (2) from the dividend and append it to 2, then repeat: 22 / 40

Going ahead to step 2:
When dividing 22 by 40, we get 0 with a remainder of 22.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 22 and we're left with 22.
Take the next digit (2) from the dividend and append it to 22, then repeat: 222 / 40

Going ahead to step 3:
40 goes into 222 5 times with a remainder of 22.
Record the quotient 5 as the next digit in the result. 
Result so far: 5.0
Subtract 200 from 222 to get 22.
Take the next digit (9) from the dividend and append it to 22, then repeat: 229 / 40

Advancing to step 4:
The number 40 fits into 229 5 times, leaving a remainder of 29.
The number 5 becomes the next digit in our result. 
Result so far: 55.0
Subtract 200 from 229 to get 29.
Fetch the next digit (8) from the dividend, attach it to 29 and continue: 298 / 40

On to step 5:
The number 40 fits into 298 7 times, leaving a remainder of 18.
The number 7 becomes the next digit in our result. 
Result so far: 557.0
The remainder is 18 after subtracting 280 from 298.
Include the next digit (7) from the dividend after 18, then repeat: 187 / 40

Step 6:
40 goes into 187 4 times with a remainder of 27.
The number 4 becomes the next digit in our result. 
Result so far: 5574.0
Deduct 160 from 187 and we're left with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Step 7:
40 can be fit into 270 6 times, resulting in a remainder of 30.
Record the quotient 6 as the next digit in the result. 
Result so far: 5574.6
Deduct 240 from 270 and we're left with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Going ahead to step 8:
If we divide 300 by 40, we get 7 and a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 5574.67
If we take 280 away from 300, we end up with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 9:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 5574.675
Subtracting 200 from 200 leaves us 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.

Advancing to step 10:
40 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 5574.675
If we subtract 0 from 0, we 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.

Let's proceed to step 11:
When dividing 0 by 40, we get 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 5574.675
If we subtract 0 from 0, we 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 5574.675 and a remainder of 0.0.