We look at the division of 400840 by 39 
Let's see how many times 39 fits into 400840.

Advancing to step 1:
When dividing 4 by 39, we get 0 with a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 39

Going ahead to step 2:
If we divide 40 by 39, we get 1 and a remainder of 1.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtracting 39 from 40 leaves us with 1.
Append the next digit (0) from the dividend to 1 and continue with: 10 / 39

Moving on to step 3:
10 divided by 39 is 0 with a remainder of 10.
The number 0 becomes the next digit in our result. 
Result so far: 10.0
If we take 0 away from 10, we end up with 10.
Bring next digit (8) of the dividend behind the 10 and repeat the process: 108 / 39

Advancing to step 4:
The number 39 fits into 108 2 times, leaving a remainder of 30.
Write down 2 as next digit of the result. 
Result so far: 102.0
Subtracting 78 from 108 leaves us with 30.
Append the next digit (4) from the dividend to 30 and continue with: 304 / 39

Moving on to step 5:
If we divide 304 by 39, we get 7 and a remainder of 31.
The number 7 becomes the next digit in our result. 
Result so far: 1027.0
If we take 273 away from 304, we end up with 31.
Include the next digit (0) from the dividend after 31, then repeat: 310 / 39

Step 6:
39 can be fit into 310 7 times, resulting in a remainder of 37.
The next digit of our result is 7. 
Result so far: 10277.0
Deduct 273 from 310 and we're left with 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

On to step 7:
39 goes into 370 9 times with a remainder of 19.
Use 9 as the next digit of our solution. 
Result so far: 10277.9
Subtract 351 from 370 to get 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Step 8:
The number 39 fits into 190 4 times, leaving a remainder of 34.
The number 4 becomes the next digit in our result. 
Result so far: 10277.94
If we subtract 156 from 190, we get 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

On to step 9:
If we divide 340 by 39, we get 8 and a remainder of 28.
Write down 8 as next digit of the result. 
Result so far: 10277.948
If we take 312 away from 340, we end up with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Step 10:
280 divided by 39 is 7 with a remainder of 7.
Put 7 as the next digit of the answer. 
Result so far: 10277.9487
If we take 273 away from 280, we end up with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Moving on to step 11:
The number 39 fits into 70 1 times, leaving a remainder of 31.
Put 1 as the next digit of the answer. 
Result so far: 10277.94871
Subtract 39 from 70 to get 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Let's proceed to step 12:
39 goes into 310 7 times with a remainder of 37.
Use 7 as the next digit of our solution. 
Result so far: 10277.948717
If we subtract 273 from 310, we get 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

Going ahead to step 13:
When dividing 370 by 39, we get 9 with a remainder of 19.
Write down 9 as next digit of the result. 
Result so far: 10277.9487179
If we take 351 away from 370, we end up with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Let's proceed to step 14:
When dividing 190 by 39, we get 4 with a remainder of 34.
The next digit of our result is 4. 
Result so far: 10277.94871794
Deduct 156 from 190 and we're left with 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

The quotient of the division is 10277.94871794, and the remainder is 3.4e-08.