We're dividing 792787 by 40 
We're looking to find how many times 40 goes into 792787.

Moving on to step 1:
40 goes into 7 0 times with a remainder of 7.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtract 0 from 7 to get 7.
Fetch the next digit (9) from the dividend, attach it to 7 and continue: 79 / 40

Going ahead to step 2:
40 goes into 79 1 times with a remainder of 39.
The next digit of our result is 1. 
Result so far: 1.0
If we subtract 40 from 79, we get 39.
Take the next digit (2) from the dividend and append it to 39, then repeat: 392 / 40

Advancing to step 3:
When dividing 392 by 40, we get 9 with a remainder of 32.
Write down 9 as next digit of the result. 
Result so far: 19.0
If we subtract 360 from 392, we get 32.
Fetch the next digit (7) from the dividend, attach it to 32 and continue: 327 / 40

On to step 4:
40 can be fit into 327 8 times, resulting in a remainder of 7.
Write down 8 as next digit of the result. 
Result so far: 198.0
If we take 320 away from 327, we end up with 7.
Take the next digit (8) from the dividend and append it to 7, then repeat: 78 / 40

On to step 5:
When dividing 78 by 40, we get 1 with a remainder of 38.
The next digit of our result is 1. 
Result so far: 1981.0
Subtract 40 from 78 to get 38.
Take the next digit (7) from the dividend and append it to 38, then repeat: 387 / 40

Let's proceed to step 6:
387 divided by 40 is 9 with a remainder of 27.
The next digit of our result is 9. 
Result so far: 19819.0
The remainder is 27 after subtracting 360 from 387.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

On to step 7:
The number 40 fits into 270 6 times, leaving a remainder of 30.
Put 6 as the next digit of the answer. 
Result so far: 19819.6
Subtract 240 from 270 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.

Going ahead to step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 19819.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.

On to step 9:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The next digit of our result is 5. 
Result so far: 19819.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.

On to step 10:
0 divided by 40 is 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19819.675
Subtract 0 from 0 to 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.

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: 19819.675
Subtract 0 from 0 to 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.

The final result is 19819.675 with a remainder of 0.0.