Let's divide 877808 by 40
We want to divide 877808 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
If we take 0 away from 8, we end up with 8.
Bring next digit (7) of the dividend behind the 8 and repeat the process: 87 / 40

Step 2:
87 divided by 40 is 2 with a remainder of 7.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we subtract 80 from 87, we get 7.
Include the next digit (7) from the dividend after 7, then repeat: 77 / 40

Going ahead to step 3:
If we divide 77 by 40, we get 1 and a remainder of 37.
Record the quotient 1 as the next digit in the result. 
Result so far: 21.0
The remainder is 37 after subtracting 40 from 77.
Append the next digit (8) from the dividend to 37 and continue with: 378 / 40

Let's proceed to step 4:
The number 40 fits into 378 9 times, leaving a remainder of 18.
The next digit of our result is 9. 
Result so far: 219.0
Deduct 360 from 378 and we're left with 18.
Take the next digit (0) from the dividend and append it to 18, then repeat: 180 / 40

Going ahead to step 5:
40 goes into 180 4 times with a remainder of 20.
The next digit of our result is 4. 
Result so far: 2194.0
Subtract 160 from 180 to get 20.
Grab the next digit (8) from the dividend, add it to 20, then carry on: 208 / 40

Moving on to step 6:
208 divided by 40 is 5 with a remainder of 8.
The next digit of our result is 5. 
Result so far: 21945.0
If we take 200 away from 208, we end up with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

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

Going ahead to step 8:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 21945.2
If we take 0 away from 0, we end up 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.

Moving on to step 9:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21945.2
If we take 0 away from 0, we end up 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.

The final outcome is 21945.2, with a leftover of 0.0.