795939 ÷ 40 
We're looking to find how many times 40 goes into 795939.

Let's proceed to step 1:
The number 40 fits into 7 0 times, leaving a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 7 leaves us with 7.
Take the next digit (9) from the dividend and append it to 7, then repeat: 79 / 40

Going ahead to step 2:
79 divided by 40 is 1 with a remainder of 39.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
The remainder is 39 after subtracting 40 from 79.
Grab the next digit (5) from the dividend, add it to 39, then carry on: 395 / 40

On to step 3:
If we divide 395 by 40, we get 9 and a remainder of 35.
The next digit of our result is 9. 
Result so far: 19.0
Subtracting 360 from 395 leaves us with 35.
Grab the next digit (9) from the dividend, add it to 35, then carry on: 359 / 40

Step 4:
40 can be fit into 359 8 times, resulting in a remainder of 39.
The next digit of our result is 8. 
Result so far: 198.0
The remainder is 39 after subtracting 320 from 359.
Fetch the next digit (3) from the dividend, attach it to 39 and continue: 393 / 40

On to step 5:
The number 40 fits into 393 9 times, leaving a remainder of 33.
Record the quotient 9 as the next digit in the result. 
Result so far: 1989.0
The remainder is 33 after subtracting 360 from 393.
Fetch the next digit (9) from the dividend, attach it to 33 and continue: 339 / 40

Let's proceed to step 6:
40 goes into 339 8 times with a remainder of 19.
Put 8 as the next digit of the answer. 
Result so far: 19898.0
Subtract 320 from 339 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.

On to step 7:
The number 40 fits into 190 4 times, leaving a remainder of 30.
The next digit of our result is 4. 
Result so far: 19898.4
Subtract 160 from 190 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Moving on to step 8:
40 can be fit into 300 7 times, resulting in a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 19898.47
Subtracting 280 from 300 leaves us 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.

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

Going ahead to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19898.475
The remainder is 0 after subtracting 0 from 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 11:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 19898.475
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 19898.475, with a leftover of 0.0.