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

Step 1:
If we divide 8 by 40, we get 0 and a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Grab the next digit (4) from the dividend, add it to 8, then carry on: 84 / 40

Advancing to step 2:
If we divide 84 by 40, we get 2 and a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Subtract 80 from 84 to get 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 40

Let's proceed to step 3:
If we divide 40 by 40, we get 1 and a remainder of 0.
Use 1 as the next digit of our solution. 
Result so far: 21.0
Subtracting 40 from 40 leaves us with 0.
Append the next digit (4) from the dividend to 0 and continue with: 4 / 40

Going ahead to step 4:
4 divided by 40 is 0 with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 210.0
If we subtract 0 from 4, we get 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 40

On to step 5:
40 divided by 40 is 1 with a remainder of 0.
The number 1 becomes the next digit in our result. 
Result so far: 2101.0
If we subtract 40 from 40, we get 0.
Grab the next digit (2) from the dividend, add it to 0, then carry on: 2 / 40

Let's proceed to step 6:
2 divided by 40 is 0 with a remainder of 2.
Put 0 as the next digit of the answer. 
Result so far: 21010.0
Subtract 0 from 2 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Going ahead to step 7:
The number 40 fits into 20 0 times, leaving a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 21010.0
Subtract 0 from 20 to get 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 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 21010.05
The remainder is 0 after subtracting 200 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

On to step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 21010.05
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.

Let's proceed 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: 21010.05
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 21010.05 and a remainder of 0.0.